Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/test/util.cpp
Show All 31 Lines | const bool is_coinbase = false; | ||||
coins.AddCoin(o, Coin(CTxOut(v, script), height, is_coinbase), false); | coins.AddCoin(o, Coin(CTxOut(v, script), height, is_coinbase), false); | ||||
} | } | ||||
ProofBuilder pb(0, std::numeric_limits<uint32_t>::max(), master); | ProofBuilder pb(0, std::numeric_limits<uint32_t>::max(), master); | ||||
pb.addUTXO(o, v, height, is_coinbase, std::move(key)); | pb.addUTXO(o, v, height, is_coinbase, std::move(key)); | ||||
return pb.build(); | return pb.build(); | ||||
} | } | ||||
bool isProofStateDustThreshold(const Proof &proof) { | |||||
for (const SignedStake &s : proof.getStakes()) { | |||||
if (s.getStake().getAmount() < PROOF_DUST_THRESHOLD) { | |||||
return true; | |||||
} | |||||
} | |||||
return false; | |||||
} | |||||
} // namespace avalanche | } // namespace avalanche |