Merge pull request #2206 from halseth/channel-commitchainheight-remove

[trivial] lnwallet/channel: remove startingHeight from commitmenChain
This commit is contained in:
Olaoluwa Osuntokun 2018-11-24 15:27:54 -06:00 committed by GitHub
commit 8924d8fb20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1023,11 +1023,10 @@ type commitmentChain struct {
startingHeight uint64
}
// newCommitmentChain creates a new commitment chain from an initial height.
func newCommitmentChain(initialHeight uint64) *commitmentChain {
// newCommitmentChain creates a new commitment chain.
func newCommitmentChain() *commitmentChain {
return &commitmentChain{
commitments: list.New(),
startingHeight: initialHeight,
commitments: list.New(),
}
}
@ -1381,8 +1380,8 @@ func NewLightningChannel(signer Signer, pCache PreimageCache,
Signer: signer,
pCache: pCache,
currentHeight: localCommit.CommitHeight,
remoteCommitChain: newCommitmentChain(remoteCommit.CommitHeight),
localCommitChain: newCommitmentChain(localCommit.CommitHeight),
remoteCommitChain: newCommitmentChain(),
localCommitChain: newCommitmentChain(),
channelState: state,
localChanCfg: &state.LocalChanCfg,
remoteChanCfg: &state.RemoteChanCfg,