aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/test_framework/mininode.py
diff options
context:
space:
mode:
authorRoss Nicoll <[email protected]>2021-08-18 00:41:27 +0100
committerGitHub <[email protected]>2021-08-18 00:41:27 +0100
commit59da28cb06fdb569fbb4d3975c01686a88f8ab11 (patch)
tree30de293bee2b221d5bfda428b08bddad6f3f2126 /qa/rpc-tests/test_framework/mininode.py
parentMerge pull request #2441 from rnicoll/1.14.4-fees-disable-rounding (diff)
parentfixup p2p-acceptblock and mininode to test disconnects (diff)
downloadarchived-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-xqa/rpc-tests/test_framework/mininode.py4
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