Changeset View
Changeset View
Standalone View
Standalone View
test/functional/p2p_filter.py
Show First 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | def test_msg_mempool(self): | ||||
filter_address = self.nodes[0].decodescript( | filter_address = self.nodes[0].decodescript( | ||||
filter_peer.watch_script_pubkey)['addresses'][0] | filter_peer.watch_script_pubkey)['addresses'][0] | ||||
txid = self.nodes[0].sendtoaddress(filter_address, 90) | txid = self.nodes[0].sendtoaddress(filter_address, 90) | ||||
self.log.debug( | self.log.debug( | ||||
"Send a mempool msg after connecting and check that the tx is received") | "Send a mempool msg after connecting and check that the tx is received") | ||||
self.nodes[0].add_p2p_connection(filter_peer) | self.nodes[0].add_p2p_connection(filter_peer) | ||||
filter_peer.send_and_ping(filter_peer.watch_filter_init) | filter_peer.send_and_ping(filter_peer.watch_filter_init) | ||||
self.nodes[0].p2p.send_message(msg_mempool()) | filter_peer.send_message(msg_mempool()) | ||||
filter_peer.wait_for_tx(txid) | filter_peer.wait_for_tx(txid) | ||||
def test_frelay_false(self, filter_peer): | def test_frelay_false(self, filter_peer): | ||||
self.log.info( | self.log.info( | ||||
"Check that a node with fRelay set to false does not receive invs until the filter is set") | "Check that a node with fRelay set to false does not receive invs until the filter is set") | ||||
filter_peer.tx_received = False | filter_peer.tx_received = False | ||||
filter_address = self.nodes[0].decodescript( | filter_address = self.nodes[0].decodescript( | ||||
filter_peer.watch_script_pubkey)['addresses'][0] | filter_peer.watch_script_pubkey)['addresses'][0] | ||||
▲ Show 20 Lines • Show All 113 Lines • Show Last 20 Lines |