diff --git a/src/avalanche/processor.cpp b/src/avalanche/processor.cpp --- a/src/avalanche/processor.cpp +++ b/src/avalanche/processor.cpp @@ -358,7 +358,7 @@ auto w = queries.getWriteView(); auto it = w->find(std::make_tuple(nodeid, response.getRound())); if (it == w.end()) { - nodePeerManager->Misbehaving(nodeid, 2, "unexpcted-ava-response"); + nodePeerManager->Misbehaving(nodeid, 2, "unexpected-ava-response"); return false; } diff --git a/src/net_processing.cpp b/src/net_processing.cpp --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2739,14 +2739,6 @@ Misbehaving(pfrom, 20, "unsolicited-" + msg_type); return; } - // Ignore avalanche requests while importing - if ((msg_type == NetMsgType::AVAPOLL || - msg_type == NetMsgType::AVARESPONSE) && - (fImporting || fReindex)) { - LogPrint(BCLog::NET, "Ignoring %s message while importing\n", - msg_type); - return; - } } if (msg_type == NetMsgType::VERSION) { diff --git a/test/functional/abc_p2p_avalanche.py b/test/functional/abc_p2p_avalanche.py --- a/test/functional/abc_p2p_avalanche.py +++ b/test/functional/abc_p2p_avalanche.py @@ -335,6 +335,14 @@ wait_until(has_parked_new_tip, timeout=15) assert_equal(node.getbestblockhash(), fork_tip) + self.log.info( + "Check the node is discouraging unexpected avaresponses.") + with self.nodes[0].assert_debug_log( + ['Misbehaving', 'peer=1 (0 -> 2): unexpected-ava-response']): + # unknown voting round + poll_node.send_avaresponse( + round=2**32 - 1, votes=[], privkey=privkey) + self.log.info( "Check the node is signalling the avalanche service bit only if there is a proof.") assert_equal(