lightningd/bitcoind: use the Bitcoin plugin for getutxout

This commit is contained in:
darosior
2020-01-09 16:38:12 +01:00
committed by Rusty Russell
parent 78cb921b80
commit c79ab0f1b0
8 changed files with 137 additions and 131 deletions

View File

@@ -3599,8 +3599,8 @@ static void process_utxo_result(struct bitcoind *bitcoind,
/* If we have more, resolve them too. */
tal_arr_remove(&utxos, 0);
if (tal_count(utxos) != 0) {
bitcoind_gettxout(bitcoind, &utxos[0]->txid, utxos[0]->outnum,
process_utxo_result, utxos);
bitcoind_getutxout(bitcoind, &utxos[0]->txid, utxos[0]->outnum,
process_utxo_result, utxos);
} else
tal_free(utxos);
}
@@ -3610,8 +3610,8 @@ void wallet_clean_utxos(struct wallet *w, struct bitcoind *bitcoind)
struct utxo **utxos = wallet_get_utxos(NULL, w, output_state_reserved);
if (tal_count(utxos) != 0) {
bitcoind_gettxout(bitcoind, &utxos[0]->txid, utxos[0]->outnum,
process_utxo_result, notleak(utxos));
bitcoind_getutxout(bitcoind, &utxos[0]->txid, utxos[0]->outnum,
process_utxo_result, notleak(utxos));
} else
tal_free(utxos);
}