From 3217918f7c1ee5ad4f0f7303b759dc526744b336 Mon Sep 17 00:00:00 2001 From: tecnovert Date: Sun, 14 Feb 2021 14:19:30 +0200 Subject: [PATCH] coins: Fix getoutput for v18 cores. --- basicswap/interface_btc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/basicswap/interface_btc.py b/basicswap/interface_btc.py index b068aa8..d366415 100644 --- a/basicswap/interface_btc.py +++ b/basicswap/interface_btc.py @@ -888,7 +888,10 @@ class BTCInterface(CoinInterface): def getOutput(self, txid, dest_script, expect_value): # TODO: Use getrawtransaction if txindex is active utxos = self.rpc_callback('scantxoutset', ['start', ['raw({})'.format(dest_script.hex())]]) - chain_height = utxos['height'] + if 'height' in utxos: # chain_height not returned by v18 codebase + chain_height = utxos['height'] + else: + chain_height = self.getChainHeight() rv = [] for utxo in utxos['unspents']: if txid and txid.hex() != utxo['txid']: