mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
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:
@@ -143,3 +143,12 @@ def basic_fee(feerate):
|
||||
else:
|
||||
weight = 724
|
||||
return (weight * feerate) // 1000
|
||||
|
||||
|
||||
def scriptpubkey_addr(scriptpubkey):
|
||||
if 'addresses' in scriptpubkey:
|
||||
return scriptpubkey['addresses'][0]
|
||||
elif 'address' in scriptpubkey:
|
||||
# Modern bitcoin (at least, git master)
|
||||
return scriptpubkey['address']
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user