From dad596fc37c8733ab806a0aa4224ac437d37aee5 Mon Sep 17 00:00:00 2001 From: John Newbery Date: Fri, 17 Nov 2017 15:01:24 -0500 Subject: [tests] Make NodeConnCB a subclass of NodeConn This makes NodeConnCB a subclass of NodeConn, and removes the need for the client code to know anything about the implementation details of NodeConnCB. NodeConn can now be swapped out for any other implementation of a low-level connection without changing client code. --- test/functional/maxuploadtarget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/maxuploadtarget.py') diff --git a/test/functional/maxuploadtarget.py b/test/functional/maxuploadtarget.py index 88e2ff2e16..beb0d599d2 100755 --- a/test/functional/maxuploadtarget.py +++ b/test/functional/maxuploadtarget.py @@ -22,10 +22,10 @@ class TestNode(NodeConnCB): super().__init__() self.block_receive_map = defaultdict(int) - def on_inv(self, conn, message): + def on_inv(self, message): pass - def on_block(self, conn, message): + def on_block(self, message): message.block.calc_sha256() self.block_receive_map[message.block.sha256] += 1 -- cgit v1.2.3