pytest: make it work with latest bitcoind master branch.

They seem to have changed the JSON output.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-04-18 14:08:22 +09:30
parent f97a51cc0f
commit b352df4179
5 changed files with 28 additions and 18 deletions

View File

@@ -10,7 +10,7 @@ from pyln.testing.utils import (
wait_for, TailableProc, env
)
from utils import (
check_coin_moves, account_balance
check_coin_moves, account_balance, scriptpubkey_addr,
)
from ephemeral_port_reserve import reserve
from utils import EXPERIMENTAL_FEATURES
@@ -483,7 +483,7 @@ def test_bech32_funding(node_factory, chainparams):
def is_p2wpkh(output):
return output['type'] == 'witness_v0_keyhash' and \
address == only_one(output['addresses'])
address == scriptpubkey_addr(output)
assert any(is_p2wpkh(output['scriptPubKey']) for output in wallettx['vout'])
assert only_one(fundingtx['vin'])['txid'] == res['wallettxid']