Page MenuHomePhabricator

D11756.diff
No OneTemporary

D11756.diff

diff --git a/src/net_processing.cpp b/src/net_processing.cpp
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -5130,10 +5130,9 @@
avalanche::PeerManager::RejectionMode::INVALIDATE;
// Fallthrough
case avalanche::VoteStatus::Rejected:
- if (g_avalanche->withPeerManager(
+ if (!g_avalanche->withPeerManager(
[&](avalanche::PeerManager &pm) {
- pm.rejectProof(proofid, rejectionMode);
- return pm.exists(proofid);
+ return pm.rejectProof(proofid, rejectionMode);
})) {
LogPrint(BCLog::AVALANCHE,
"ERROR: Failed to reject proof: %s\n",
diff --git a/test/functional/abc_p2p_avalanche_proof_voting.py b/test/functional/abc_p2p_avalanche_proof_voting.py
--- a/test/functional/abc_p2p_avalanche_proof_voting.py
+++ b/test/functional/abc_p2p_avalanche_proof_voting.py
@@ -282,7 +282,11 @@
proofid, response=AvalancheProofVoteResponse.REJECTED))
return proofid not in get_proof_ids(node)
- self.wait_until(lambda: reject_proof(proofid_seq50))
+ with node.assert_debug_log(
+ [f"Avalanche rejected proof {proofid_seq50:0{64}x}"],
+ ["Failed to reject proof"]
+ ):
+ self.wait_until(lambda: reject_proof(proofid_seq50))
assert proofid_seq50 not in get_proof_ids(node)
assert proofid_seq40 in get_proof_ids(node)
@@ -296,7 +300,11 @@
return try_rpc(-8, "Proof not found",
node.getrawavalancheproof, f"{proofid:0{64}x}")
- self.wait_until(lambda: invalidate_proof(proofid_seq50))
+ with node.assert_debug_log(
+ [f"Avalanche invalidated proof {proofid_seq50:0{64}x}"],
+ ["Failed to reject proof"]
+ ):
+ self.wait_until(lambda: invalidate_proof(proofid_seq50))
self.log.info("The node will now ignore the invalid proof")

File Metadata

Mime Type
text/plain
Expires
Tue, May 20, 20:36 (14 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5865896
Default Alt Text
D11756.diff (2 KB)

Event Timeline