Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/proof.cpp
Show First 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | if (!useLegacy(gArgs)) { | ||||
} | } | ||||
} | } | ||||
StakeId prevId = uint256::ZERO; | StakeId prevId = uint256::ZERO; | ||||
std::unordered_set<COutPoint, SaltedOutpointHasher> utxos; | std::unordered_set<COutPoint, SaltedOutpointHasher> utxos; | ||||
for (const SignedStake &ss : stakes) { | for (const SignedStake &ss : stakes) { | ||||
const Stake &s = ss.getStake(); | const Stake &s = ss.getStake(); | ||||
if (s.getAmount() < PROOF_DUST_THRESHOLD) { | if (s.getAmount() < PROOF_DUST_THRESHOLD) { | ||||
return state.Invalid(ProofValidationResult::DUST_THRESOLD, | return state.Invalid(ProofValidationResult::DUST_THRESHOLD, | ||||
"amount-below-dust-threshold", | "amount-below-dust-threshold", | ||||
strprintf("%s < %s", s.getAmount().ToString(), | strprintf("%s < %s", s.getAmount().ToString(), | ||||
PROOF_DUST_THRESHOLD.ToString())); | PROOF_DUST_THRESHOLD.ToString())); | ||||
} | } | ||||
if (s.getId() < prevId) { | if (s.getId() < prevId) { | ||||
return state.Invalid(ProofValidationResult::WRONG_STAKE_ORDERING, | return state.Invalid(ProofValidationResult::WRONG_STAKE_ORDERING, | ||||
"wrong-stake-ordering"); | "wrong-stake-ordering"); | ||||
▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines |