Skip to content

Commit 5856962

Browse files
committed
Handle UpgradeState after an upgrade is scheduled.
1 parent b83cb12 commit 5856962

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tui/internal/bubbles/status/status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ func (m Model) View() string {
201201
builder.WriteString(fmt.Sprintf("Block wait time: %s\n", time.Duration(m.Status.TimeSinceLastRound).Round(roundTo)))
202202
builder.WriteString(fmt.Sprintf("Sync time: %s\n", time.Duration(m.Status.CatchupTime).Round(roundTo)))
203203
height -= 3
204-
if m.Header.UpgradeState != (types.UpgradeState{}) {
204+
if m.Header.UpgradeState != (types.UpgradeState{}) && (uint64(m.Header.UpgradeState.NextProtocolVoteBefore) > m.Status.LastRound) {
205205
//remainingToUpgrade := m.calculateTimeToGo(
206206
// m.Status.LastRound, uint64(m.Header.NextProtocolSwitchOn), m.style.AccountBlueText)
207207
remainingToVote := m.calculateTimeToGo(

0 commit comments

Comments
 (0)