aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/p2p-segwit.py4
-rwxr-xr-xtest/functional/test_framework/mininode.py14
2 files changed, 9 insertions, 9 deletions
diff --git a/test/functional/p2p-segwit.py b/test/functional/p2p-segwit.py
index 943bc2c6d2..a9ef47559b 100755
--- a/test/functional/p2p-segwit.py
+++ b/test/functional/p2p-segwit.py
@@ -32,8 +32,8 @@ def get_virtual_size(witness_block):
return vsize
class TestNode(NodeConnCB):
- def set_test_params(self):
- self.num_nodes = 3
+ def __init__(self):
+ super().__init__()
self.getdataset = set()
def on_getdata(self, conn, message):
diff --git a/test/functional/test_framework/mininode.py b/test/functional/test_framework/mininode.py
index abed661f37..d072969d7f 100755
--- a/test/functional/test_framework/mininode.py
+++ b/test/functional/test_framework/mininode.py
@@ -1502,6 +1502,7 @@ class NodeConnCB(object):
except:
print("ERROR delivering %s (%s)" % (repr(message),
sys.exc_info()[0]))
+ raise
def get_deliver_sleep_time(self):
with mininode_lock:
@@ -1702,13 +1703,10 @@ class NodeConn(asyncore.dispatcher):
self.cb.on_close(self)
def handle_read(self):
- try:
- t = self.recv(8192)
- if len(t) > 0:
- self.recvbuf += t
- self.got_data()
- except:
- pass
+ t = self.recv(8192)
+ if len(t) > 0:
+ self.recvbuf += t
+ self.got_data()
def readable(self):
return True
@@ -1774,8 +1772,10 @@ class NodeConn(asyncore.dispatcher):
self.got_message(t)
else:
logger.warning("Received unknown command from %s:%d: '%s' %s" % (self.dstaddr, self.dstport, command, repr(msg)))
+ raise ValueError("Unknown command: '%s'" % (command))
except Exception as e:
logger.exception('got_data:', repr(e))
+ raise
def send_message(self, message, pushbuf=False):
if self.state != "connected" and not pushbuf: