Skip to content

Commit

Permalink
Add check that htlc not added during in-progress splice
Browse files Browse the repository at this point in the history
  • Loading branch information
remyers committed Jul 27, 2023
1 parent f51710e commit 7082c4a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ class NormalSplicesStateSpec extends TestKitBaseClass with FixtureAnyFunSuiteLik
// alice confirms the splice abort
alice2bob.expectMsgType[TxAbort]
// the htlc is not added
assert(!alice.stateData.asInstanceOf[DATA_NORMAL].commitments.hasPendingOrProposedHtlcs)
}

test("recv UpdateAddHtlc while a splice is in progress") { f =>
Expand All @@ -682,6 +683,7 @@ class NormalSplicesStateSpec extends TestKitBaseClass with FixtureAnyFunSuiteLik
// alice returns a warning and schedules a disconnect after receiving UpdateAddHtlc
alice2bob.expectMsg(Warning(channelId(alice), ForbiddenDuringSplice(channelId(alice), "UpdateAddHtlc").getMessage))
// the htlc is not added
assert(!alice.stateData.asInstanceOf[DATA_NORMAL].commitments.hasPendingOrProposedHtlcs)
}

test("recv UpdateAddHtlc before splice confirms (zero-conf)", Tag(ZeroConf), Tag(AnchorOutputsZeroFeeHtlcTxs)) { f =>
Expand Down

0 comments on commit 7082c4a

Please sign in to comment.