HomePhabricator

[tests] Check connectivity before sending in assumevalid.py

Description

[tests] Check connectivity before sending in assumevalid.py

Summary:
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.

Backport core's PR11345

Test Plan:

./test/functional/test_runner.py assumevalid.py

Reviewers: #bitcoin_abc, schancel

Reviewed By: #bitcoin_abc, schancel

Subscribers: teamcity

Differential Revision: https://reviews.bitcoinabc.org/D1123

Details

Provenance
John Newbery <john@johnnewbery.com>Authored on Sep 15 2017, 18:36
deadalnixCommitted on Feb 24 2018, 08:06
deadalnixPushed on Feb 24 2018, 08:06
Reviewer
Restricted Project
Differential Revision
D1123: [tests] Check connectivity before sending in assumevalid.py
Parents
rABCb9d1dd5f26c1: Remove needless import.
Branches
Unknown
Tags
Unknown