mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-07 16:14:26 +01:00
wallet: remove edgecase around transaction checks
we don't populate the tx item when we're running a transaction check from deep chain (prior to a chain replay)
This commit is contained in:
committed by
Christian Decker
parent
b2c4d5e952
commit
700b766ce1
@@ -990,7 +990,7 @@ static enum watch_result funding_depth_cb(struct lightningd *ld,
|
||||
struct short_channel_id scid;
|
||||
|
||||
/* Sanity check */
|
||||
if (tx && !check_funding_tx(tx, channel)) {
|
||||
if (!check_funding_tx(tx, channel)) {
|
||||
channel_internal_error(channel, "Bad tx %s: %s",
|
||||
type_to_string(tmpctx,
|
||||
struct bitcoin_txid, txid),
|
||||
|
||||
@@ -300,8 +300,12 @@ void watch_topology_changed(struct chain_topology *topo)
|
||||
u32 depth;
|
||||
|
||||
depth = get_tx_depth(topo, &w->txid);
|
||||
if (depth)
|
||||
if (depth) {
|
||||
if (!w->tx)
|
||||
w->tx = wallet_transaction_get(w, topo->ld->wallet,
|
||||
&w->txid);
|
||||
needs_rerun |= txw_fire(w, &w->txid, depth);
|
||||
}
|
||||
}
|
||||
} while (needs_rerun);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user