mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
merge bitcoin#26396: Avoid SetTxRelay for feeler connections
continuation of dash#6365 includes: - fa24239a (changes to `p2p_sendtxrcncl.py`)
This commit is contained in:
parent
62dc9cb17b
commit
36be978fc9
@ -34,6 +34,12 @@ class SendTxrcnclReceiver(P2PInterface):
|
||||
def on_sendtxrcncl(self, message):
|
||||
self.sendtxrcncl_msg_received = message
|
||||
|
||||
|
||||
class P2PFeelerReceiver(SendTxrcnclReceiver):
|
||||
def on_version(self, message):
|
||||
pass # feeler connections can not send any message other than their own version
|
||||
|
||||
|
||||
class PeerTrackMsgOrder(P2PInterface):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
@ -151,6 +157,11 @@ class SendTxRcnclTest(BitcoinTestFramework):
|
||||
assert not peer.sendtxrcncl_msg_received
|
||||
peer.peer_disconnect()
|
||||
|
||||
self.log.info("SENDTXRCNCL should not be sent if feeler")
|
||||
peer = self.nodes[0].add_outbound_p2p_connection(P2PFeelerReceiver(), p2p_idx=2, connection_type="feeler")
|
||||
assert not peer.sendtxrcncl_msg_received
|
||||
peer.peer_disconnect()
|
||||
|
||||
self.log.info('SENDTXRCNCL if block-relay-only triggers a disconnect')
|
||||
peer = self.nodes[0].add_outbound_p2p_connection(
|
||||
PeerNoVerack(), wait_for_verack=False, p2p_idx=3, connection_type="block-relay-only")
|
||||
|
Loading…
Reference in New Issue
Block a user