Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/proofbuilder.h
Show All 32 Lines | 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, CKey key); | ||||
Proof build(); | Proof build(); | ||||
/** | |||||
* Builds a randomized (and therefore invalid) Proof. | |||||
* Useful for tests. | |||||
*/ | |||||
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 |