mirror of
https://github.com/ACINQ/eclair.git
synced 2024-11-19 09:54:02 +01:00
Always store remote commit_sig
in interactive tx (#2681)
In theory we don't have to store their commit_sig here, as they would re-send it if we disconnect, but it is more consistent with the case where we send our tx_signatures first.
This commit is contained in:
parent
e7b46314cc
commit
46d1c73889
@ -525,8 +525,10 @@ class Channel(val nodeParams: NodeParams, val wallet: OnChainChannelFunder with
|
||||
stay() using d.copy(spliceStatus = SpliceStatus.SpliceAborted) sending TxAbort(d.channelId, f.getMessage)
|
||||
case Right(signingSession1) => signingSession1 match {
|
||||
case signingSession1: InteractiveTxSigningSession.WaitingForSigs =>
|
||||
// No need to store their commit_sig, they will re-send it if we disconnect.
|
||||
stay() using d.copy(spliceStatus = SpliceStatus.SpliceWaitingForSigs(signingSession1))
|
||||
// In theory we don't have to store their commit_sig here, as they would re-send it if we disconnect, but
|
||||
// it is more consistent with the case where we send our tx_signatures first.
|
||||
val d1 = d.copy(spliceStatus = SpliceStatus.SpliceWaitingForSigs(signingSession1))
|
||||
stay() using d1 storing()
|
||||
case signingSession1: InteractiveTxSigningSession.SendingSigs =>
|
||||
// We don't have their tx_sigs, but they have ours, and could publish the funding tx without telling us.
|
||||
// That's why we move on immediately to the next step, and will update our unsigned funding tx when we
|
||||
|
@ -371,8 +371,10 @@ trait ChannelOpenDualFunded extends DualFundingHandlers with ErrorHandlers {
|
||||
goto(CLOSED) sending Error(d.channelId, f.getMessage)
|
||||
case Right(signingSession1) => signingSession1 match {
|
||||
case signingSession1: InteractiveTxSigningSession.WaitingForSigs =>
|
||||
// No need to store their commit_sig, they will re-send it if we disconnect.
|
||||
stay() using d.copy(signingSession = signingSession1)
|
||||
// In theory we don't have to store their commit_sig here, as they would re-send it if we disconnect, but
|
||||
// it is more consistent with the case where we send our tx_signatures first.
|
||||
val d1 = d.copy(signingSession = signingSession1)
|
||||
stay() using d1 storing()
|
||||
case signingSession1: InteractiveTxSigningSession.SendingSigs =>
|
||||
// We don't have their tx_sigs, but they have ours, and could publish the funding tx without telling us.
|
||||
// That's why we move on immediately to the next step, and will update our unsigned funding tx when we
|
||||
|
@ -55,6 +55,8 @@ class NormalSplicesStateSpec extends TestKitBaseClass with FixtureAnyFunSuiteLik
|
||||
val setup = init(tags = tags)
|
||||
import setup._
|
||||
reachNormal(setup, tags)
|
||||
alice2bob.ignoreMsg { case _: ChannelUpdate => true }
|
||||
bob2alice.ignoreMsg { case _: ChannelUpdate => true }
|
||||
awaitCond(alice.stateName == NORMAL)
|
||||
awaitCond(bob.stateName == NORMAL)
|
||||
withFixture(test.toNoArgTest(setup))
|
||||
|
Loading…
Reference in New Issue
Block a user