Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/proofbuilder.h
Show All 28 Lines | class ProofBuilder { | ||||
std::vector<StakeSigner> stakes; | std::vector<StakeSigner> 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, CKey key); | bool addUTXO(COutPoint utxo, Amount amount, uint32_t height, | ||||
bool is_coinbase, CKey key); | |||||
Proof build(); | Proof build(); | ||||
/** | /** | ||||
* Builds a randomized (and therefore invalid) Proof. | * Builds a randomized (and therefore invalid) Proof. | ||||
* Useful for tests. | * Useful for tests. | ||||
*/ | */ | ||||
static Proof buildRandom(uint32_t score); | static Proof buildRandom(uint32_t score); | ||||
private: | private: | ||||
ProofId getProofId() const; | ProofId getProofId() const; | ||||
}; | }; | ||||
} // namespace avalanche | } // namespace avalanche | ||||
#endif // BITCOIN_AVALANCHE_PROOFBUILDER_H | #endif // BITCOIN_AVALANCHE_PROOFBUILDER_H |