@@ -88,8 +88,12 @@ def initialize_chain(test_dir):
88
88
if i > 0 :
89
89
args .append ("-connect=127.0.0.1:" + str (p2p_port (0 )))
90
90
bitcoind_processes [i ] = subprocess .Popen (args )
91
+ if os .getenv ("PYTHON_DEBUG" , "" ):
92
+ print "initialize_chain: bitcoind started, calling bitcoin-cli -rpcwait getblockcount"
91
93
subprocess .check_call ([ os .getenv ("BITCOINCLI" , "bitcoin-cli" ), "-datadir=" + datadir ,
92
94
"-rpcwait" , "getblockcount" ], stdout = devnull )
95
+ if os .getenv ("PYTHON_DEBUG" , "" ):
96
+ print "initialize_chain: bitcoin-cli -rpcwait getblockcount completed"
93
97
devnull .close ()
94
98
rpcs = []
95
99
for i in range (4 ):
@@ -169,9 +173,13 @@ def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=
169
173
if extra_args is not None : args .extend (extra_args )
170
174
bitcoind_processes [i ] = subprocess .Popen (args )
171
175
devnull = open ("/dev/null" , "w+" )
176
+ if os .getenv ("PYTHON_DEBUG" , "" ):
177
+ print "start_node: bitcoind started, calling bitcoin-cli -rpcwait getblockcount"
172
178
subprocess .check_call ([ os .getenv ("BITCOINCLI" , "bitcoin-cli" ), "-datadir=" + datadir ] +
173
179
_rpchost_to_args (rpchost ) +
174
180
["-rpcwait" , "getblockcount" ], stdout = devnull )
181
+ if os .getenv ("PYTHON_DEBUG" , "" ):
182
+ print "start_node: calling bitcoin-cli -rpcwait getblockcount returned"
175
183
devnull .close ()
176
184
url = "http://rt:rt@%s:%d" % (rpchost or '127.0.0.1' , rpc_port (i ))
177
185
if timewait is not None :
0 commit comments