Commit d7b0f1f
lightningd: don't try to re-xmit funding tx for already-confirmed channels.
`resend_opening_transactions` runs at startup before `begin_topology()`, so `channel->depth` is still 0 (its DB-load default) for every channel.
The `depth != 0` guard was therefore a no-op, and we issued a `sendrawtransaction` for every committed channel on every restart. For long-confirmed channels bitcoind replies with error `-27` ("Transaction outputs already in utxo set"), surfacing as an `UNUSUAL` log on every startup.
Gate on channel state instead: only the three states where the funding or splice tx can still be unconfirmed
(`CHANNELD_AWAITING_LOCKIN`, DUALOPEND_AWAITING_LOCKIN`, `CHANNELD_AWAITING_SPLICE`) qualify for rebroadcast.
Changelog-Fixed: lightningd: don't spuriously try to re-broadcast funding txs of already-confirmed channels on startup.1 parent 6aae3d4 commit d7b0f1f
2 files changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
568 | | - | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
569 | 575 | | |
570 | 576 | | |
571 | 577 | | |
572 | | - | |
573 | | - | |
574 | 578 | | |
575 | 579 | | |
576 | 580 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3087 | 3087 | | |
3088 | 3088 | | |
3089 | 3089 | | |
3090 | | - | |
| 3090 | + | |
3091 | 3091 | | |
0 commit comments