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 5,124 Lines • ▼ Show 20 Lines | if (msg_type == NetMsgType::AVARESPONSE) { | ||||
rejectedProofs->insert(proofid)); | rejectedProofs->insert(proofid)); | ||||
// Fallthrough | // Fallthrough | ||||
case avalanche::VoteStatus::Stale: | case avalanche::VoteStatus::Stale: | ||||
// Invalidate mode removes the proof from all proof pools | // Invalidate mode removes the proof from all proof pools | ||||
rejectionMode = | rejectionMode = | ||||
avalanche::PeerManager::RejectionMode::INVALIDATE; | avalanche::PeerManager::RejectionMode::INVALIDATE; | ||||
// Fallthrough | // Fallthrough | ||||
case avalanche::VoteStatus::Rejected: | case avalanche::VoteStatus::Rejected: | ||||
if (g_avalanche->withPeerManager( | if (!g_avalanche->withPeerManager( | ||||
[&](avalanche::PeerManager &pm) { | [&](avalanche::PeerManager &pm) { | ||||
pm.rejectProof(proofid, rejectionMode); | return pm.rejectProof(proofid, rejectionMode); | ||||
return pm.exists(proofid); | |||||
})) { | })) { | ||||
LogPrint(BCLog::AVALANCHE, | LogPrint(BCLog::AVALANCHE, | ||||
"ERROR: Failed to reject proof: %s\n", | "ERROR: Failed to reject proof: %s\n", | ||||
proofid.GetHex()); | proofid.GetHex()); | ||||
} | } | ||||
break; | break; | ||||
case avalanche::VoteStatus::Finalized: | case avalanche::VoteStatus::Finalized: | ||||
nextCooldownTimePoint += std::chrono::seconds(gArgs.GetArg( | nextCooldownTimePoint += std::chrono::seconds(gArgs.GetArg( | ||||
▲ Show 20 Lines • Show All 1,979 Lines • Show Last 20 Lines |