Skip to content

Commit

Permalink
Merge pull request #2206 from halseth/channel-commitchainheight-remove
Browse files Browse the repository at this point in the history
[trivial] lnwallet/channel: remove startingHeight from commitmenChain
  • Loading branch information
Roasbeef committed Nov 24, 2018
2 parents 712fc3e + 5c29460 commit 8924d8f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lnwallet/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 8924d8f

Please sign in to comment.