Skip to content

Commit

Permalink
Fix proxy_test logging crash when no IPv6 available
Browse files Browse the repository at this point in the history
Summary:
The test tried to use the self.log member in `__init__()`
but it is only set up in main() in BitcoinTestFramework.

This moves the calls into setup_nodes() which is called
by main, and should log correctly if IPv6 is not available.

Test Plan:
  qa/pull-tester/rpc-tests.py proxy_test
check that the test no longer fails on Travis

Reviewers: #bitcoin_abc, deadalnix, CCulianu

Reviewed By: #bitcoin_abc, deadalnix, CCulianu

Differential Revision: https://reviews.bitcoinabc.org/D504
  • Loading branch information
ftrader committed Aug 28, 2017
1 parent 42a8373 commit 7a0048e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qa/rpc-tests/proxy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def __init__(self):
self.num_nodes = 4
self.setup_clean_chain = False

def setup_nodes(self):
self.have_ipv6 = test_ipv6_local()
# Create two proxies on different ports
# ... one unauthenticated
Expand Down Expand Up @@ -81,7 +82,6 @@ def __init__(self):
self.serv3 = Socks5Server(self.conf3)
self.serv3.start()

def setup_nodes(self):
# Note: proxies are not used to connect to local nodes
# this is because the proxy to use is based on CService.GetNetwork(),
# which return NET_UNROUTABLE for localhost
Expand Down

0 comments on commit 7a0048e

Please sign in to comment.