diff options
| author | Ross Nicoll <[email protected]> | 2021-08-18 00:41:27 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-18 00:41:27 +0100 |
| commit | 59da28cb06fdb569fbb4d3975c01686a88f8ab11 (patch) | |
| tree | 30de293bee2b221d5bfda428b08bddad6f3f2126 /qa/rpc-tests/test_framework/mininode.py | |
| parent | Merge pull request #2441 from rnicoll/1.14.4-fees-disable-rounding (diff) | |
| parent | fixup p2p-acceptblock and mininode to test disconnects (diff) | |
| download | archived-discoin-59da28cb06fdb569fbb4d3975c01686a88f8ab11.tar.xz archived-discoin-59da28cb06fdb569fbb4d3975c01686a88f8ab11.zip | |
Merge pull request #2458 from patricklodder/1.14.4-disconnect-bad-node-test
Test that peers building on invalid blocks get disconnected
Diffstat (limited to 'qa/rpc-tests/test_framework/mininode.py')
| -rwxr-xr-x | qa/rpc-tests/test_framework/mininode.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py index 1520e6754..964e98a1c 100755 --- a/qa/rpc-tests/test_framework/mininode.py +++ b/qa/rpc-tests/test_framework/mininode.py @@ -1684,6 +1684,10 @@ class NodeConn(asyncore.dispatcher): if len(t) > 0: self.recvbuf += t self.got_data() + else: + self.show_debug_msg("MiniNode: Closing connection to %s:%d after peer disconnect..." + % (self.dstaddr, self.dstport)) + self.handle_close() except: pass |