Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/peermanager.cpp
Show First 20 Lines • Show All 249 Lines • ▼ Show 20 Lines | if (!WITH_LOCK(cs_main, return proof->verify(validationState, chainman))) { | ||||
// the lowest scoring proof. | // the lowest scoring proof. | ||||
orphanProofPool.removeProof( | orphanProofPool.removeProof( | ||||
orphanProofPool.getLowestScoreProof()->getId()); | orphanProofPool.getLowestScoreProof()->getId()); | ||||
} | } | ||||
return invalidate(ProofRegistrationResult::ORPHAN, "orphan-proof"); | return invalidate(ProofRegistrationResult::ORPHAN, "orphan-proof"); | ||||
} | } | ||||
if (validationState.GetResult() == | |||||
ProofValidationResult::MISSING_UTXO) { | |||||
return invalidate(ProofRegistrationResult::MISSING_UTXO, | |||||
"utxo-missing-or-spent"); | |||||
} | |||||
// Reject invalid proof. | // Reject invalid proof. | ||||
return invalidate(ProofRegistrationResult::INVALID, "invalid-proof"); | return invalidate(ProofRegistrationResult::INVALID, "invalid-proof"); | ||||
} | } | ||||
auto now = GetTime<std::chrono::seconds>(); | auto now = GetTime<std::chrono::seconds>(); | ||||
auto nextCooldownTimePoint = | auto nextCooldownTimePoint = | ||||
now + std::chrono::seconds( | now + std::chrono::seconds( | ||||
gArgs.GetArg("-avalancheconflictingproofcooldown", | gArgs.GetArg("-avalancheconflictingproofcooldown", | ||||
▲ Show 20 Lines • Show All 560 Lines • Show Last 20 Lines |