diff options
author | Suhas Daftuar <sdaftuar@chaincode.com> | 2017-09-13 09:17:15 -0400 |
---|---|---|
committer | Suhas Daftuar <sdaftuar@chaincode.com> | 2017-09-13 09:17:15 -0400 |
commit | a7820422e0b182db6f1df8904242e5d76d6c73fa (patch) | |
tree | e4bbad32054bf0baf28efa083b6e6e7a1279684e | |
parent | ce829855cfca103dde55661fa1524e66b139d063 (diff) |
qa: Treat mininode p2p exceptions as fatal
-rwxr-xr-x | test/functional/test_framework/mininode.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/test_framework/mininode.py b/test/functional/test_framework/mininode.py index 2607b9b07c..c6ee9b2190 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: @@ -1701,13 +1702,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 @@ -1773,8 +1771,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: |