Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
util.h
Go to the documentation of this file.
1// Copyright (c) 2020 The Bitcoin developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_AVALANCHE_TEST_UTIL_H
6#define BITCOIN_AVALANCHE_TEST_UTIL_H
7
8#include <avalanche/proof.h>
10#include <key.h>
11#include <script/script.h>
12
13#include <vector>
14
15namespace avalanche {
16
18
22
24 int height = 100,
25 const CKey &masterKey = CKey::MakeCompressedKey());
26
27bool hasDustStake(const ProofRef &proof);
28
35
36} // namespace avalanche
37
38#endif // BITCOIN_AVALANCHE_TEST_UTIL_H
static constexpr Amount COIN
Definition amount.h:144
An encapsulated secp256k1 private key.
Definition key.h:28
static CKey MakeCompressedKey()
Produce a valid compressed key.
Definition key.cpp:466
Serialized script, used inside transaction inputs and outputs.
Definition script.h:431
Chainstate stores and provides an API to update our local knowledge of the current best chain.
Definition validation.h:699
static constexpr Amount PROOF_DUST_THRESHOLD
Minimum amount per utxo.
Definition proof.h:40
const CScript UNSPENDABLE_ECREG_PAYOUT_SCRIPT
Definition util.h:19
ProofRef buildRandomProof(Chainstate &active_chainstate, uint32_t score, int height, const CKey &masterKey)
Definition util.cpp:20
constexpr uint32_t MIN_VALID_PROOF_SCORE
Definition util.h:17
bool hasDustStake(const ProofRef &proof)
Definition util.cpp:41
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85
@ OP_CHECKSIG
Definition script.h:163
@ OP_EQUALVERIFY
Definition script.h:120
static ProofRef buildWithReversedOrderStakes(ProofBuilder &pb)
Definition util.cpp:65
static ProofRef buildDuplicatedStakes(ProofBuilder &pb)
Definition util.cpp:106
static LimitedProofId getReverseOrderLimitedProofId(ProofBuilder &pb)
Definition util.cpp:51
static LimitedProofId getDuplicatedStakeLimitedProofId(ProofBuilder &pb)
Definition util.cpp:91