Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/test/orphanproofpool_tests.cpp
Show All 13 Lines | |||||
#include <array> | #include <array> | ||||
#include <queue> | #include <queue> | ||||
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 ProofRef 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, CKey::MakeCompressedKey()); | 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())); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |