12 bool is_coinbase,
CKey key) {
19 Stake(std::move(utxo), amount, height, is_coinbase, key.
GetPubKey());
26 return stakes.emplace(std::move(stake), std::move(
sig)).second;
55 for (
const auto &s :
stakes) {
An encapsulated secp256k1 private key.
bool IsValid() const
Check whether this private key is valid.
CPubKey GetPubKey() const
Compute the public key from a private key.
bool SignSchnorr(const uint256 &hash, SchnorrSig &sig, uint32_t test_case=0) const
Create a Schnorr signature.
An outpoint - a combination of a transaction hash and an index n into its vout.
A writer stream (for serialization) that computes a 256-bit hash.
static RCUPtr make(Args &&...args)
Construct a new object that is owned by the pointer.
bool addUTXO(COutPoint utxo, Amount amount, uint32_t height, bool is_coinbase, CKey key)
std::set< SignedStake, SignedStakeComparator > stakes
ProofId getProofId() const
LimitedProofId getLimitedProofId() const
CScript payoutScriptPubKey
std::array< uint8_t, CPubKey::SCHNORR_SIZE > SchnorrSig
a Schnorr signature
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...
void WriteCompactSize(CSizeComputer &os, uint64_t nSize)