Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/test/orphanproofpool_tests.cpp
Show All 16 Lines | |||||
using namespace avalanche; | using namespace avalanche; | ||||
BOOST_FIXTURE_TEST_SUITE(orphanproofpool_tests, TestingSetup) | BOOST_FIXTURE_TEST_SUITE(orphanproofpool_tests, TestingSetup) | ||||
/** Make a proof with stakes using random txids */ | /** Make a proof with stakes using random txids */ | ||||
static std::shared_ptr<Proof> makeProof(const size_t nStakes) { | static std::shared_ptr<Proof> makeProof(const size_t nStakes) { | ||||
const Amount v = 5 * COIN; | const Amount v = 5 * COIN; | ||||
const int height = 1234; | const int height = 1234; | ||||
ProofBuilder pb(0, 0, CPubKey()); | ProofBuilder pb(0, 0, CKey::MakeCompressedKey()); | ||||
for (size_t i = 0; i < nStakes; i++) { | for (size_t i = 0; i < nStakes; i++) { | ||||
TxId txid(GetRandHash()); | TxId txid(GetRandHash()); | ||||
BOOST_CHECK(pb.addUTXO(COutPoint(txid, 0), v, height, false, | BOOST_CHECK(pb.addUTXO(COutPoint(txid, 0), v, height, false, | ||||
CKey::MakeCompressedKey())); | CKey::MakeCompressedKey())); | ||||
} | } | ||||
return std::make_shared<Proof>(pb.build()); | return std::make_shared<Proof>(pb.build()); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 130 Lines • Show Last 20 Lines |