diff --git a/src/avalanche/test/delegation_tests.cpp b/src/avalanche/test/delegation_tests.cpp --- a/src/avalanche/test/delegation_tests.cpp +++ b/src/avalanche/test/delegation_tests.cpp @@ -31,7 +31,7 @@ BOOST_AUTO_TEST_CASE(verify_random) { auto key = CKey::MakeCompressedKey(); - auto p = buildRandomProof(123456, key); + auto p = buildRandomProof(123456, 1234, key); DelegationBuilder dgb(*p); { @@ -171,7 +171,7 @@ BOOST_AUTO_TEST_CASE(level_limit) { auto proofKey = CKey::MakeCompressedKey(); - auto p = buildRandomProof(123456, proofKey); + auto p = buildRandomProof(123456, 1234, proofKey); DelegationBuilder dgb(*p); diff --git a/src/avalanche/test/processor_tests.cpp b/src/avalanche/test/processor_tests.cpp --- a/src/avalanche/test/processor_tests.cpp +++ b/src/avalanche/test/processor_tests.cpp @@ -1137,7 +1137,7 @@ uint32_t minScore = Proof::amountToScore(minStake * currency.baseunit); const CKey key = CKey::MakeCompressedKey(); - auto localProof = buildRandomProof(minScore / 4, key); + auto localProof = buildRandomProof(minScore / 4, 1234, key); gArgs.ForceSetArg("-avamasterkey", EncodeSecret(key)); gArgs.ForceSetArg("-avaproof", localProof->ToHex()); diff --git a/src/avalanche/test/util.h b/src/avalanche/test/util.h --- a/src/avalanche/test/util.h +++ b/src/avalanche/test/util.h @@ -15,7 +15,7 @@ constexpr uint32_t MIN_VALID_PROOF_SCORE = 100 * PROOF_DUST_THRESHOLD / COIN; -ProofRef buildRandomProof(uint32_t score, +ProofRef buildRandomProof(uint32_t score, int height = 1234, const CKey &masterKey = CKey::MakeCompressedKey()); bool hasDustStake(const ProofRef &proof); diff --git a/src/avalanche/test/util.cpp b/src/avalanche/test/util.cpp --- a/src/avalanche/test/util.cpp +++ b/src/avalanche/test/util.cpp @@ -17,12 +17,11 @@ namespace avalanche { -ProofRef buildRandomProof(uint32_t score, const CKey &masterKey) { +ProofRef buildRandomProof(uint32_t score, int height, const CKey &masterKey) { auto key = CKey::MakeCompressedKey(); const COutPoint o(TxId(GetRandHash()), 0); const Amount v = (int64_t(score) * COIN) / 100; - const int height = 1234; const bool is_coinbase = false; {