Skip to content

Commit

Permalink
wallet: Fix output extraction when we own multiple outputs
Browse files Browse the repository at this point in the history
When we already know about an output we would stop scanning the remaining
outputs. Known outputs happen whenever we extracted from our own transactions
and then extracted again from blocks. We would not update if the first update
fails.

Signed-off-by: Christian Decker <[email protected]>
  • Loading branch information
cdecker committed Mar 6, 2018
1 parent ae30942 commit 5a1b4b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wallet/wallet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ int wallet_extract_owned_outputs(struct wallet *w, const struct bitcoin_tx *tx,
if (block)
wallet_output_confirm(w, &utxo->txid, utxo->outnum, block->height);
tal_free(utxo);
return -1;
continue;
}
outpointfilter_add(w->owned_outpoints, &utxo->txid, utxo->outnum);

Expand Down

0 comments on commit 5a1b4b9

Please sign in to comment.