Merge pull request #2206 from halseth/channel-commitchainheight-remove
[trivial] lnwallet/channel: remove startingHeight from commitmenChain
This commit is contained in:
commit
8924d8fb20
@ -1023,11 +1023,10 @@ type commitmentChain struct {
|
|||||||
startingHeight uint64
|
startingHeight uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
// newCommitmentChain creates a new commitment chain from an initial height.
|
// newCommitmentChain creates a new commitment chain.
|
||||||
func newCommitmentChain(initialHeight uint64) *commitmentChain {
|
func newCommitmentChain() *commitmentChain {
|
||||||
return &commitmentChain{
|
return &commitmentChain{
|
||||||
commitments: list.New(),
|
commitments: list.New(),
|
||||||
startingHeight: initialHeight,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1381,8 +1380,8 @@ func NewLightningChannel(signer Signer, pCache PreimageCache,
|
|||||||
Signer: signer,
|
Signer: signer,
|
||||||
pCache: pCache,
|
pCache: pCache,
|
||||||
currentHeight: localCommit.CommitHeight,
|
currentHeight: localCommit.CommitHeight,
|
||||||
remoteCommitChain: newCommitmentChain(remoteCommit.CommitHeight),
|
remoteCommitChain: newCommitmentChain(),
|
||||||
localCommitChain: newCommitmentChain(localCommit.CommitHeight),
|
localCommitChain: newCommitmentChain(),
|
||||||
channelState: state,
|
channelState: state,
|
||||||
localChanCfg: &state.LocalChanCfg,
|
localChanCfg: &state.LocalChanCfg,
|
||||||
remoteChanCfg: &state.RemoteChanCfg,
|
remoteChanCfg: &state.RemoteChanCfg,
|
||||||
|
Loading…
Reference in New Issue
Block a user