diff --git a/tests/test_wallet.py b/tests/test_wallet.py index f007e052d..d50de4060 100644 --- a/tests/test_wallet.py +++ b/tests/test_wallet.py @@ -8,7 +8,6 @@ import pytest import time -@pytest.mark.xfail def test_withdraw(node_factory, bitcoind): amount = 1000000 # Don't get any funds from previous runs. diff --git a/wallet/wallet.c b/wallet/wallet.c index 9e86688ce..44db30064 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -1372,6 +1372,11 @@ int wallet_extract_owned_outputs(struct wallet *w, const struct bitcoin_tx *tx, tal_free(utxo); continue; } + + /* This is an unconfirmed change output, we should track it */ + if (!is_p2sh && !blockheight) + txfilter_add_scriptpubkey(w->ld->owned_txfilter, script); + outpointfilter_add(w->owned_outpoints, &utxo->txid, utxo->outnum); if (!amount_sat_add(total, *total, utxo->amount))