Changeset View
Changeset View
Standalone View
Standalone View
test/functional/p2p_feefilter.py
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | class FeeFilterTest(BitcoinTestFramework): | ||||
def run_test(self): | def run_test(self): | ||||
node1 = self.nodes[1] | node1 = self.nodes[1] | ||||
node0 = self.nodes[0] | node0 = self.nodes[0] | ||||
# Get out of IBD | # Get out of IBD | ||||
node1.generate(1) | node1.generate(1) | ||||
sync_blocks(self.nodes) | sync_blocks(self.nodes) | ||||
# Setup the p2p connections | |||||
self.nodes[0].add_p2p_connection(TestP2PConn()) | self.nodes[0].add_p2p_connection(TestP2PConn()) | ||||
self.nodes[0].p2p.wait_for_verack() | |||||
# Test that invs are received for all txs at feerate of 20 sat/byte | # Test that invs are received for all txs at feerate of 20 sat/byte | ||||
node1.settxfee(Decimal("0.00020000")) | node1.settxfee(Decimal("0.00020000")) | ||||
txids = [node1.sendtoaddress(node1.getnewaddress(), 1) | txids = [node1.sendtoaddress(node1.getnewaddress(), 1) | ||||
for x in range(3)] | for x in range(3)] | ||||
assert(allInvsMatch(txids, self.nodes[0].p2p)) | assert(allInvsMatch(txids, self.nodes[0].p2p)) | ||||
self.nodes[0].p2p.clear_invs() | self.nodes[0].p2p.clear_invs() | ||||
Show All 37 Lines |