diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-06-07 09:14:33 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-06-21 11:35:44 -0400 |
commit | ffff3fe50a16bd7dde3d2d206bbe7bc41c483bb8 (patch) | |
tree | 147d329767ad87aa9a7132432b96c63b13c5eadb | |
parent | faccdc8a3143c9849e61312a7f438bc6e8232496 (diff) | |
download | bitcoin-ffff3fe50a16bd7dde3d2d206bbe7bc41c483bb8.tar.xz |
test: Replace self.nodes[0].p2p with conn
-rwxr-xr-x | test/functional/p2p_feefilter.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/functional/p2p_feefilter.py b/test/functional/p2p_feefilter.py index 8cc62fbe12..0dfbb69468 100755 --- a/test/functional/p2p_feefilter.py +++ b/test/functional/p2p_feefilter.py @@ -58,23 +58,23 @@ class FeeFilterTest(BitcoinTestFramework): node1 = self.nodes[1] node0 = self.nodes[0] - self.nodes[0].add_p2p_connection(TestP2PConn()) + conn = self.nodes[0].add_p2p_connection(TestP2PConn()) # Test that invs are received by test connection for all txs at # feerate of .2 sat/byte node1.settxfee(Decimal("0.00000200")) txids = [node1.sendtoaddress(node1.getnewaddress(), 1) for x in range(3)] - assert allInvsMatch(txids, self.nodes[0].p2p) - self.nodes[0].p2p.clear_invs() + assert allInvsMatch(txids, conn) + conn.clear_invs() # Set a filter of .15 sat/byte on test connection - self.nodes[0].p2p.send_and_ping(msg_feefilter(150)) + conn.send_and_ping(msg_feefilter(150)) # Test that txs are still being received by test connection (paying .15 sat/byte) node1.settxfee(Decimal("0.00000150")) txids = [node1.sendtoaddress(node1.getnewaddress(), 1) for x in range(3)] - assert allInvsMatch(txids, self.nodes[0].p2p) - self.nodes[0].p2p.clear_invs() + assert allInvsMatch(txids, conn) + conn.clear_invs() # Change tx fee rate to .1 sat/byte and test they are no longer received # by the test connection @@ -91,14 +91,14 @@ class FeeFilterTest(BitcoinTestFramework): # as well. node0.settxfee(Decimal("0.00020000")) txids = [node0.sendtoaddress(node0.getnewaddress(), 1)] - assert allInvsMatch(txids, self.nodes[0].p2p) - self.nodes[0].p2p.clear_invs() + assert allInvsMatch(txids, conn) + conn.clear_invs() # Remove fee filter and check that txs are received again - self.nodes[0].p2p.send_and_ping(msg_feefilter(0)) + conn.send_and_ping(msg_feefilter(0)) txids = [node1.sendtoaddress(node1.getnewaddress(), 1) for x in range(3)] - assert allInvsMatch(txids, self.nodes[0].p2p) - self.nodes[0].p2p.clear_invs() + assert allInvsMatch(txids, conn) + conn.clear_invs() if __name__ == '__main__': |