Repository navigation
Return the interactive-tx send error instead of hanging splice_update - #9605
vincenzopalazzo wants to merge 1 commit into
Conversation
274271d to
6c3047c
Compare
The turn loop discarded the error from sending the next change. If that send failed, nothing went out and channeld blocked in peer_read waiting for a peer that had already sent tx_complete. That is the splice_update hang in ElementsProject#9599. The shared funding input is built by channeld, so the first turn succeeds. The user's input needs the previous transaction, which bitcoind's utxoupdatepsbt does not put in the PSBT, so the next send fails and the RPC never returned. Changelog-Fixed: splice: `splice_update` returns an error instead of hanging when a contributed input has no previous transaction.
6c3047c to
d05e7fe
Compare
|
Concept ACK: the one-line change is the right fix for #9599. Two suggestions before merge:
Separate from this PR: the forced-disconnect half of #9599 is still open, because the pending splice command is only failed on the warning path. CI did not run on d05e7fe; both runs were cancelled at start. |
Summary
splice_updatehung after the peer answered the firsttx_add_inputwithtx_completeand then nothing else went out. Fixessplice_updatehangs and never returns, even after disconnecting peer #9599.master(019a5e190). The turn loop inprocess_interactivetx_updatesdiscarded the error fromsend_next. The shared funding input is built by channeld, so that first turn succeeds. The user's input needs the previous transaction in the PSBT.utxoupdatepsbtonly fillswitness_utxo, so the next send fails, nothing is written, and channeld blocked inpeer_read.splice_updatenow fails withinteractivetx ADD_INPUT PSBT needs the previous transaction setinstead of staying pending. No disconnect is required.tx_completeis still just one turn. We do not finalize the splice there.Test plan
test_splice_update_missing_prevtxon current master: stripPSBT_IN_NON_WITNESS_UTXOfrom the user's input andsplice_updatereturnsRpcErrormatchingprevious transactiontest_splicestill completes a normal splice