File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ def set_test_params(self):
61
61
def run_test (self ):
62
62
self .test_feefilter_forcerelay ()
63
63
self .test_feefilter ()
64
+ self .test_feefilter_blocksonly ()
64
65
65
66
def test_feefilter_forcerelay (self ):
66
67
self .log .info ('Check that peers without forcerelay permission (default) get a feefilter message' )
@@ -119,6 +120,19 @@ def test_feefilter(self):
119
120
conn .wait_for_invs_to_match (txids )
120
121
conn .clear_invs ()
121
122
123
+ def test_feefilter_blocksonly (self ):
124
+ """Test that we don't send fee filters to block-relay-only peers and when we're in blocksonly mode."""
125
+ self .log .info ("Check that we don't send fee filters to block-relay-only peers." )
126
+ feefilter_peer = self .nodes [0 ].add_outbound_p2p_connection (FeefilterConn (), p2p_idx = 0 , connection_type = "block-relay-only" )
127
+ feefilter_peer .sync_with_ping ()
128
+ feefilter_peer .assert_feefilter_received (False )
129
+
130
+ self .log .info ("Check that we don't send fee filters when in blocksonly mode." )
131
+ self .restart_node (0 , ["-blocksonly" ])
132
+ feefilter_peer = self .nodes [0 ].add_p2p_connection (FeefilterConn ())
133
+ feefilter_peer .sync_with_ping ()
134
+ feefilter_peer .assert_feefilter_received (False )
135
+
122
136
123
137
if __name__ == '__main__' :
124
138
FeeFilterTest ().main ()
You can’t perform that action at this time.
0 commit comments