multi: make NewChanIDFromOutpoint accept value instead of pointer
This commit is contained in:
1 parent
fd1cd315ce
commit
db39a905cb
27 files changed
+108
-106
No files matched your search
+7
-7
@@ -3560,7 +3560,7 @@ func (lc *LightningChannel) createCommitDiff(
|
||||
// used on the wire to identify this channel. We'll use this shortly
|
||||
// when recording the exact CommitSig message that we'll be sending
|
||||
// out.
|
||||
chanID := lnwire.NewChanIDFromOutPoint(&lc.channelState.FundingOutpoint)
|
||||
chanID := lnwire.NewChanIDFromOutPoint(lc.channelState.FundingOutpoint)
|
||||
|
||||
var (
|
||||
logUpdates []channeldb.LogUpdate
|
||||
@@ -3680,7 +3680,7 @@ func (lc *LightningChannel) createCommitDiff(
|
||||
Commitment: *diskCommit,
|
||||
CommitSig: &lnwire.CommitSig{
|
||||
ChanID: lnwire.NewChanIDFromOutPoint(
|
||||
&lc.channelState.FundingOutpoint,
|
||||
lc.channelState.FundingOutpoint,
|
||||
),
|
||||
CommitSig: commitSig,
|
||||
HtlcSigs: htlcSigs,
|
||||
@@ -3698,7 +3698,7 @@ func (lc *LightningChannel) createCommitDiff(
|
||||
func (lc *LightningChannel) getUnsignedAckedUpdates() []channeldb.LogUpdate {
|
||||
// First, we need to convert the funding outpoint into the ID that's
|
||||
// used on the wire to identify this channel.
|
||||
chanID := lnwire.NewChanIDFromOutPoint(&lc.channelState.FundingOutpoint)
|
||||
chanID := lnwire.NewChanIDFromOutPoint(lc.channelState.FundingOutpoint)
|
||||
|
||||
// Fetch the last remote update that we have signed for.
|
||||
lastRemoteCommitted := lc.remoteCommitChain.tail().theirMessageIndex
|
||||
@@ -4543,7 +4543,7 @@ func (lc *LightningChannel) ProcessChanSyncMsg(
|
||||
case err == nil:
|
||||
commitSig := &lnwire.CommitSig{
|
||||
ChanID: lnwire.NewChanIDFromOutPoint(
|
||||
&lc.channelState.FundingOutpoint,
|
||||
lc.channelState.FundingOutpoint,
|
||||
),
|
||||
CommitSig: newCommit.CommitSig,
|
||||
HtlcSigs: newCommit.HtlcSigs,
|
||||
@@ -5571,7 +5571,7 @@ func (lc *LightningChannel) RevokeCurrentCommitment() (*lnwire.RevokeAndAck,
|
||||
len(unsignedAckedUpdates))
|
||||
|
||||
revocationMsg.ChanID = lnwire.NewChanIDFromOutPoint(
|
||||
&lc.channelState.FundingOutpoint,
|
||||
lc.channelState.FundingOutpoint,
|
||||
)
|
||||
|
||||
return revocationMsg, newCommitment.Htlcs, finalHtlcs, nil
|
||||
@@ -5638,7 +5638,7 @@ func (lc *LightningChannel) ReceiveRevocation(revMsg *lnwire.RevokeAndAck) (
|
||||
localChainTail := lc.localCommitChain.tail().height
|
||||
|
||||
source := lc.ShortChanID()
|
||||
chanID := lnwire.NewChanIDFromOutPoint(&lc.channelState.FundingOutpoint)
|
||||
chanID := lnwire.NewChanIDFromOutPoint(lc.channelState.FundingOutpoint)
|
||||
|
||||
// Determine the set of htlcs that can be forwarded as a result of
|
||||
// having received the revocation. We will simultaneously construct the
|
||||
@@ -8517,7 +8517,7 @@ func (lc *LightningChannel) generateRevocation(height uint64) (*lnwire.RevokeAnd
|
||||
|
||||
revocationMsg.NextRevocationKey = input.ComputeCommitmentPoint(nextCommitSecret[:])
|
||||
revocationMsg.ChanID = lnwire.NewChanIDFromOutPoint(
|
||||
&lc.channelState.FundingOutpoint,
|
||||
lc.channelState.FundingOutpoint,
|
||||
)
|
||||
|
||||
// If this is a taproot channel, then we also need to generate the
|
||||
|
||||
Reference in new issue
Block a user