Fix failed to retransmit funding tx#9147
Open
enaples wants to merge 2 commits into
Open
Conversation
`resend_opening_transactions` gated on `channel->depth != 0`, but depth is reset to 0 when channels are loaded from the DB and only repopulated `after begin_topology()` runs. So at startup every channel matched and `bitcoind` rejected the rebroadcast with error `-27` ("Transaction outputs already in utxo set"), facing as an `UNUSUAL` log.
Changelog-Fixed: lightningd: don't spuriously try to re-broadcast funding txs of already-confirmed channels on startup.
…nnels.
`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.
6261b55 to
3c2cf6e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
26.06 FREEZE April 30th: Non-bugfix PRs not ready by this date will wait for 26.09.
RC1 is scheduled on May 14th
The final release is scheduled for June 1st.
Checklist
Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:
tools/lightning-downgradeFix issue #9091
Changelog-Fixed: lightningd: don't spuriously try to re-broadcast funding txs of already-confirmed channels on startup.