[Pkg-bitcoin-commits] [bitcoin] 42/126: [tests] Check connectivity before sending in assumevalid.py
Jonas Smedegaard
dr at jones.dk
Mon Nov 13 20:01:06 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag debian/0.15.1_dfsg-1
in repository bitcoin.
commit f9cf7b589f430b2d7c52e477b6d62f29d748c38e
Author: John Newbery <john at johnnewbery.com>
Date: Fri Sep 15 14:36:12 2017 -0400
[tests] Check connectivity before sending in assumevalid.py
assumevalid.py would try to send over a closed P2P connection in a loop,
hitting the following failure many times:
TestFramework.mininode (ERROR): Cannot send message. No connection to node!
The test still passes, but this is a lot of noise in the test log.
Just check that the connection is open before trying to send.
Github-Pull: #11345
Rebased-From: e9e9391083721ca9733cc00a1907384f83b6435e
---
test/functional/assumevalid.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/functional/assumevalid.py b/test/functional/assumevalid.py
index beaf8c7..65685c4 100755
--- a/test/functional/assumevalid.py
+++ b/test/functional/assumevalid.py
@@ -68,6 +68,8 @@ class AssumeValidTest(BitcoinTestFramework):
def send_blocks_until_disconnected(self, node):
"""Keep sending blocks to the node until we're disconnected."""
for i in range(len(self.blocks)):
+ if not node.connection:
+ break
try:
node.send_message(msg_block(self.blocks[i]))
except IOError as e:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/bitcoin.git
More information about the Pkg-bitcoin-commits
mailing list