Skip to content

Commit

Permalink
chore: remaining two comments
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-forbes committed Oct 14, 2024
1 parent 1ef98d0 commit 23e3fb1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
9 changes: 1 addition & 8 deletions consensus/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -676,23 +676,16 @@ func (cs *State) updateToState(state sm.State) {
// cs.StartTime = state.LastBlockTime.Add(timeoutCommit)

if state.LastBlockHeight == 0 {
// state represents the genesis state, hence the StartTime should be set based on the state's TimeoutCommit
// we don't use cs.state.TimeoutCommit because that is zero
// Don't use cs.state.TimeoutCommit because that is zero
cs.StartTime = cs.config.CommitWithCustomTimeout(cmttime.Now(), state.TimeoutCommit)
} else {
// if state does not represent the genesis state,
// we use the cs.state.TimeoutCommit
cs.StartTime = cs.config.CommitWithCustomTimeout(cmttime.Now(), cs.state.TimeoutCommit)
}

} else {
if state.LastBlockHeight == 0 {
// state represents the genesis state, hence the StartTime should be set based on the state's TimeoutCommit
// we don't use cs.state.TimeoutCommit because that is zero
cs.StartTime = cs.config.CommitWithCustomTimeout(cs.CommitTime, state.TimeoutCommit)
} else {
// if state does not represent the genesis state,
// we use the cs.state.TimeoutCommit
cs.StartTime = cs.config.CommitWithCustomTimeout(cs.CommitTime, cs.state.TimeoutCommit)
}

Expand Down
1 change: 0 additions & 1 deletion node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,6 @@ func NewNodeWithContext(ctx context.Context,
}

// Setup Transport.
// TODO limit the proxyApp to Query only
transport, peerFilters := createTransport(config, nodeInfo, nodeKey, proxyApp, tracer)

// Setup Switch.
Expand Down

0 comments on commit 23e3fb1

Please sign in to comment.