diff options
author | John Newbery <john@johnnewbery.com> | 2017-03-30 08:38:46 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2017-04-18 17:20:09 -0400 |
commit | 2a52ae63bfdde948250df1c876dcdd5af99f03b5 (patch) | |
tree | d53a338b3c6c9eba1474330412dd0e5953822399 /test/functional/p2p-feefilter.py | |
parent | 52e15aa4d067fc4ace12c80be5c82e85c04fcfec (diff) | |
download | bitcoin-2a52ae63bfdde948250df1c876dcdd5af99f03b5.tar.xz |
Remove duplicate method definitions in NodeConnCB subclasses
All Node classes in individual test cases subclass from NodeConnCB. Many
have duplicate definitions for methods that are defined in the base
class. This commit removes those duplicate definitions.
This commit removes ~290 lines of duplicate code.
Diffstat (limited to 'test/functional/p2p-feefilter.py')
-rwxr-xr-x | test/functional/p2p-feefilter.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/test/functional/p2p-feefilter.py b/test/functional/p2p-feefilter.py index 12539be950..fe1a43ac54 100755 --- a/test/functional/p2p-feefilter.py +++ b/test/functional/p2p-feefilter.py @@ -22,8 +22,6 @@ def allInvsMatch(invsExpected, testnode): time.sleep(1) return False -# TestNode: bare-bones "peer". Used to track which invs are received from a node -# and to send the node feefilter messages. class TestNode(NodeConnCB): def __init__(self): super().__init__() @@ -38,10 +36,6 @@ class TestNode(NodeConnCB): with mininode_lock: self.txinvs = [] - def send_filter(self, feerate): - self.send_message(msg_feefilter(feerate)) - self.sync_with_ping() - class FeeFilterTest(BitcoinTestFramework): def __init__(self): @@ -78,7 +72,7 @@ class FeeFilterTest(BitcoinTestFramework): test_node.clear_invs() # Set a filter of 15 sat/byte - test_node.send_filter(15000) + test_node.send_and_ping(msg_feefilter(15000)) # Test that txs are still being received (paying 20 sat/byte) txids = [node1.sendtoaddress(node1.getnewaddress(), 1) for x in range(3)] @@ -103,7 +97,7 @@ class FeeFilterTest(BitcoinTestFramework): test_node.clear_invs() # Remove fee filter and check that txs are received again - test_node.send_filter(0) + test_node.send_and_ping(msg_feefilter(0)) txids = [node1.sendtoaddress(node1.getnewaddress(), 1) for x in range(3)] assert(allInvsMatch(txids, test_node)) test_node.clear_invs() |