Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 7,120 Lines • ▼ Show 20 Lines | if (state.GetResult() == | ||||
avalanche::ProofRegistrationResult::COOLDOWN_NOT_ELAPSED) { | avalanche::ProofRegistrationResult::COOLDOWN_NOT_ELAPSED) { | ||||
// Conflicting proofs are not necessarly adversarial, but if they are | // Conflicting proofs are not necessarly adversarial, but if they are | ||||
// repeated within a short time period this is suspicious, so we affect | // repeated within a short time period this is suspicious, so we affect | ||||
// a low ban score to our peer. | // a low ban score to our peer. | ||||
Misbehaving(nodeid, 5, state.GetRejectReason()); | Misbehaving(nodeid, 5, state.GetRejectReason()); | ||||
return false; | return false; | ||||
} | } | ||||
if (state.GetResult() == avalanche::ProofRegistrationResult::MISSING_UTXO) { | |||||
// This is possible that a proof contains a utxo we don't know yet, so | |||||
// don't ban for this. | |||||
return false; | |||||
} | |||||
if (!g_avalanche->addProofToReconcile(proof)) { | if (!g_avalanche->addProofToReconcile(proof)) { | ||||
LogPrint(BCLog::AVALANCHE, | LogPrint(BCLog::AVALANCHE, | ||||
"Not polling the avalanche proof (%s): peer=%d, proofid %s\n", | "Not polling the avalanche proof (%s): peer=%d, proofid %s\n", | ||||
state.IsValid() ? "not-worth-polling" | state.IsValid() ? "not-worth-polling" | ||||
: state.GetRejectReason(), | : state.GetRejectReason(), | ||||
nodeid, proofid.ToString()); | nodeid, proofid.ToString()); | ||||
} | } | ||||
return true; | return true; | ||||
} | } |