12 #include <validation.h> 23 const Amount v = (int64_t(score) *
COIN) / 100;
24 const int height = 1234;
25 const bool is_coinbase =
false;
35 ProofBuilder pb(0, std::numeric_limits<uint32_t>::max(), master);
36 pb.
addUTXO(o, v, height, is_coinbase, std::move(key));
CPubKey GetPubKey() const
Compute the public key from a private key.
uint256 GetRandHash() noexcept
Proof buildRandomProof(uint32_t score, const CPubKey &master)
CChainState & ChainstateActive()
static constexpr Amount COIN
An encapsulated public key.
bool addUTXO(COutPoint utxo, Amount amount, uint32_t height, bool is_coinbase, CKey key)
void MakeNewKey(bool fCompressed)
Generate a new private key using a cryptographic PRNG.
RecursiveMutex cs_main
Global state.
An output of a transaction.
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a Bitcoin scriptPubKey for the given CTxDestination.
An outpoint - a combination of a transaction hash and an index n into its vout.
Serialized script, used inside transaction inputs and outputs.
A TxId is the identifier of a transaction.
CCoinsViewCache & CoinsTip() EXCLUSIVE_LOCKS_REQUIRED(cs_main)
void AddCoin(const COutPoint &outpoint, Coin coin, bool potential_overwrite)
Add a coin.
An encapsulated secp256k1 private key.
CCoinsView that adds a memory cache for transactions to another CCoinsView.