Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/proofbuilder.h
Show All 35 Lines | class ProofBuilder { | ||||
}; | }; | ||||
std::set<StakeSigner, StakeSignerComparator> stakes; | std::set<StakeSigner, StakeSignerComparator> stakes; | ||||
public: | public: | ||||
ProofBuilder(uint64_t sequence_, int64_t expirationTime_, CPubKey master_) | ProofBuilder(uint64_t sequence_, int64_t expirationTime_, CPubKey master_) | ||||
: sequence(sequence_), expirationTime(expirationTime_), | : sequence(sequence_), expirationTime(expirationTime_), | ||||
master(std::move(master_)) {} | master(std::move(master_)) {} | ||||
bool addUTXO(COutPoint utxo, Amount amount, uint32_t height, | [[nodiscard]] bool addUTXO(COutPoint utxo, Amount amount, uint32_t height, | ||||
bool is_coinbase, CKey key); | bool is_coinbase, CKey key); | ||||
Proof build(); | Proof build(); | ||||
private: | private: | ||||
ProofId getProofId() const; | ProofId getProofId() const; | ||||
friend struct TestProofBuilder; | friend struct TestProofBuilder; | ||||
}; | }; | ||||
} // namespace avalanche | } // namespace avalanche | ||||
#endif // BITCOIN_AVALANCHE_PROOFBUILDER_H | #endif // BITCOIN_AVALANCHE_PROOFBUILDER_H |