mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-28 05:42:37 +02:00
htlcswitch: remove logCommitTick
Replace logCommitTick as a way to deal with revocation window exhaustion by retrying to update the commit tx when the remote revocation is received. The rationale is that the revocation window always opens up because of a revoke message that is received from the other party. It is therefore not necessary to set a timer for this. The reception of the revoke message is the trigger to send a new commit sig if necessary.
This commit is contained in:
@@ -5983,20 +5983,12 @@ func TestChannelLinkRevocationWindowRegular(t *testing.T) {
|
||||
// At this point, Alice cannot send a new commit sig to bob because the
|
||||
// revocation window is exhausted.
|
||||
|
||||
// Sleep to let the commit ticker expire. The revocation window is still
|
||||
// exhausted.
|
||||
time.Sleep(time.Second)
|
||||
|
||||
// Bob sends revocation and signs commit with htlc1 settled.
|
||||
ctx.sendRevAndAckBobToAlice()
|
||||
|
||||
// Allow some time for the log commit ticker to trigger for Alice.
|
||||
time.Sleep(time.Second)
|
||||
|
||||
// Now that Bob revoked, Alice should send the sig she owes.
|
||||
//
|
||||
// THIS SHOULD NOT HAPPEN.
|
||||
ctx.assertNoMsgFromAlice(time.Second)
|
||||
// After the revocation, it is again possible for Alice to send a commit
|
||||
// sig with htlc2.
|
||||
ctx.receiveCommitSigAliceToBob(1)
|
||||
}
|
||||
|
||||
// TestChannelLinkRevocationWindowHodl asserts that htlcs paying to a hodl
|
||||
|
Reference in New Issue
Block a user