Skip to content

Commit 19f0b04

Browse files
committed
pyln-testing: don't assume we're doing debug logging for fundwallet and line_graph helpers.
We want to use log-level info for benchmarking, for example. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent f49818c commit 19f0b04

File tree

1 file changed

+3
-2
lines changed
  • contrib/pyln-testing/pyln/testing

1 file changed

+3
-2
lines changed

contrib/pyln-testing/pyln/testing/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ def fundwallet(self, sats, addrtype="bech32", mine_block=True):
10271027
addr = self.rpc.newaddr(addrtype)[addrtype]
10281028
if mine_block:
10291029
txid = self.bitcoin.send_and_mine_block(addr, sats)
1030-
self.daemon.wait_for_log('Owning output .* txid {} CONFIRMED'.format(txid))
1030+
wait_for(lambda: any([t['hash'] == txid for t in self.rpc.listtransactions()['transactions']]))
10311031
else:
10321032
txid = self.bitcoin.rpc.sendtoaddress(addr, sats / 10**8)
10331033

@@ -1778,7 +1778,8 @@ def join_nodes(self, nodes, fundchannel=True, fundamount=FUNDAMOUNT, wait_for_an
17781778
# getpeers.
17791779
if not fundchannel:
17801780
for src, dst in connections:
1781-
dst.daemon.wait_for_log(r'{}-connectd: Handed peer, entering loop'.format(src.info['id']))
1781+
wait_for(lambda: src.rpc.listpeers(dst.info['id'])['peers'] != [])
1782+
wait_for(lambda: dst.rpc.listpeers(src.info['id'])['peers'] != [])
17821783
return
17831784

17841785
bitcoind = nodes[0].bitcoin

0 commit comments

Comments
 (0)