htlcswitch: keep final htlc outcome
This commit is contained in:
20 files changed
+466
-111
No files matched your search
+2
-1
@@ -1920,7 +1920,8 @@ func (l *channelLink) handleUpstreamMsg(msg lnwire.Message) {
|
||||
// As we've just accepted a new state, we'll now
|
||||
// immediately send the remote peer a revocation for our prior
|
||||
// state.
|
||||
nextRevocation, currentHtlcs, err := l.channel.RevokeCurrentCommitment()
|
||||
nextRevocation, currentHtlcs, _, err :=
|
||||
l.channel.RevokeCurrentCommitment()
|
||||
if err != nil {
|
||||
l.log.Errorf("unable to revoke commitment: %v", err)
|
||||
return
|
||||
|
||||
@@ -179,7 +179,7 @@ func (l *linkTestContext) receiveCommitSigAlice(expHtlcs int) *lnwire.CommitSig
|
||||
func (l *linkTestContext) sendRevAndAckBobToAlice() {
|
||||
l.t.Helper()
|
||||
|
||||
rev, _, err := l.bobChannel.RevokeCurrentCommitment()
|
||||
rev, _, _, err := l.bobChannel.RevokeCurrentCommitment()
|
||||
if err != nil {
|
||||
l.t.Fatalf("unable to revoke commitment: %v", err)
|
||||
}
|
||||
|
||||
@@ -1958,7 +1958,7 @@ func handleStateUpdate(link *channelLink,
|
||||
return err
|
||||
}
|
||||
|
||||
remoteRev, _, err := remoteChannel.RevokeCurrentCommitment()
|
||||
remoteRev, _, _, err := remoteChannel.RevokeCurrentCommitment()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -2062,7 +2062,7 @@ func updateState(batchTick chan time.Time, link *channelLink,
|
||||
}
|
||||
|
||||
// Lastly, send a revocation back to the link.
|
||||
remoteRev, _, err := remoteChannel.RevokeCurrentCommitment()
|
||||
remoteRev, _, _, err := remoteChannel.RevokeCurrentCommitment()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -3134,7 +3134,7 @@ func TestChannelLinkTrimCircuitsRemoteCommit(t *testing.T) {
|
||||
|
||||
// Next, revoke Bob's current commitment and send it to Alice so that we
|
||||
// can test that Alice's circuits aren't trimmed.
|
||||
rev, _, err := bobChan.RevokeCurrentCommitment()
|
||||
rev, _, _, err := bobChan.RevokeCurrentCommitment()
|
||||
require.NoError(t, err, "unable to revoke current commitment")
|
||||
|
||||
_, _, _, _, err = alice.channel.ReceiveRevocation(rev)
|
||||
|
||||
Reference in new issue
Block a user