mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +01:00
Revert "core: Defer extracting the script until we're sure we'll use it"
See the next commit for context on this revert.
This reverts commit d185b0fa90
.
Signed-off-by: Jon Griffiths <jon_p_griffiths@yahoo.com>
This commit is contained in:
parent
7cbff8a2c0
commit
0578069a7a
1 changed files with 2 additions and 3 deletions
|
@ -965,12 +965,11 @@ static void topo_add_utxos(struct chain_topology *topo, struct block *b)
|
|||
if (!amount_asset_is_main(&amt))
|
||||
continue; /* Ignore non-policy asset outputs */
|
||||
|
||||
if (!bitcoin_tx_output_script_is_p2wsh(tx, n))
|
||||
const u8 *script = bitcoin_tx_output_get_script(tmpctx, tx, n);
|
||||
if (!is_p2wsh(script, NULL))
|
||||
continue; /* We only care about p2wsh utxos */
|
||||
|
||||
struct bitcoin_outpoint outpoint = { b->txids[i], n };
|
||||
const u8 *script =
|
||||
bitcoin_tx_output_get_script(tmpctx, tx, n);
|
||||
wallet_utxoset_add(topo->ld->wallet, &outpoint,
|
||||
b->height, i, script,
|
||||
amount_asset_to_sat(&amt));
|
||||
|
|
Loading…
Add table
Reference in a new issue