Skip to content

Commit

Permalink
[temp] - lnwallet: channel rebase fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Roasbeef committed Jan 20, 2023
1 parent aa0a735 commit 9636891
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lnwallet/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/channeldb/models"
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/keychain"
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/shachain"
Expand Down Expand Up @@ -5130,7 +5131,7 @@ func (lc *LightningChannel) RevokeCurrentCommitment() (*lnwire.RevokeAndAck,
)
}

return revocationMsg, newCommitment.Htlcs, nil
return revocationMsg, newCommitment.Htlcs, finalHtlcs, nil
}

// ReceiveRevocation processes a revocation sent by the remote party for the
Expand Down
4 changes: 2 additions & 2 deletions lnwallet/channel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func testAddSettleWorkflow(t *testing.T, tweakless bool,
chanType |= chanTypeModifier
}

aliceChannel, bobChannel, cleanUp, err := CreateTestChannels(chanType)
aliceChannel, bobChannel, err := CreateTestChannels(t, chanType)
require.NoError(t, err, "unable to create test channels")

paymentPreimage := bytes.Repeat([]byte{1}, 32)
Expand Down Expand Up @@ -3598,7 +3598,7 @@ func TestChanSyncOweRevocationAndCommit(t *testing.T) {
require.NoError(t, err, "alice unable to recv revocation")
err = aliceChannel.ReceiveNewCommitment(bobNewCommit.CommitSigs)
require.NoError(t, err, "alice unable to recv bob's commitment")
aliceRevocation, _, err := aliceChannel.RevokeCurrentCommitment()
aliceRevocation, _, _, err := aliceChannel.RevokeCurrentCommitment()
require.NoError(t, err, "alice unable to revoke commitment")
_, _, _, _, err = bobChannel.ReceiveRevocation(aliceRevocation)
require.NoError(t, err, "bob unable to recv revocation")
Expand Down

0 comments on commit 9636891

Please sign in to comment.