mirror of
https://github.com/ACINQ/eclair.git
synced 2025-02-22 22:25:26 +01:00
Unlock utxos on reconnect when signatures haven't been sent (#2827)
In the case where we have not sent our `TxSignatures`, and our peer replies with an error at reconnection, we can safely unlock our local inputs.
This commit is contained in:
parent
86c483708a
commit
e32044f05f
2 changed files with 4 additions and 2 deletions
|
@ -436,7 +436,7 @@ trait ChannelOpenDualFunded extends DualFundingHandlers with ErrorHandlers {
|
|||
handleFastClose(c, d.channelId) sending Error(d.channelId, DualFundingAborted(d.channelId).getMessage)
|
||||
|
||||
case Event(e: Error, d: DATA_WAIT_FOR_DUAL_FUNDING_SIGNED) =>
|
||||
rollbackFundingAttempt(d.signingSession.fundingTx.tx, Nil)
|
||||
// handleRemoteError takes care of rolling back the funding tx
|
||||
handleRemoteError(e, d)
|
||||
|
||||
case Event(INPUT_DISCONNECTED, d: DATA_WAIT_FOR_DUAL_FUNDING_SIGNED) =>
|
||||
|
|
|
@ -145,7 +145,9 @@ trait ErrorHandlers extends CommonHandlers {
|
|||
spendLocalCurrent(hasCommitments)
|
||||
}
|
||||
// When there is no commitment yet, we just go to CLOSED state in case an error occurs.
|
||||
case _: ChannelDataWithoutCommitments => goto(CLOSED)
|
||||
case waitForDualFundingSigned: DATA_WAIT_FOR_DUAL_FUNDING_SIGNED =>
|
||||
rollbackFundingAttempt(waitForDualFundingSigned.signingSession.fundingTx.tx, Nil)
|
||||
goto(CLOSED)
|
||||
case _: TransientChannelData => goto(CLOSED)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue