Skip to content

Commit

Permalink
fix panic in gui, bump to v1.10.2 immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
sduchesneau committed Sep 6, 2024
1 parent ae433b3 commit bfef85c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docs/release-notes/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.10.2

* `substreams gui`: fix panic in some conditions when streaming from block 0

## v1.10.1

### Server
Expand Down
8 changes: 4 additions & 4 deletions tui2/pages/output/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type Output struct {
lastDisplayContext *displayContext
lastOutputContent string

lowBlock uint64
lowBlock *uint64
highBlock uint64
firstBlockSeen bool

Expand Down Expand Up @@ -149,13 +149,13 @@ func (o *Output) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case *pbsubstreamsrpc.BlockScopedData:
blockNum := msg.Clock.Number

if o.lowBlock == 0 {
o.lowBlock = blockNum
if o.lowBlock == nil {
o.lowBlock = &blockNum
}
if o.highBlock < blockNum {
o.highBlock = blockNum
}
o.blockSelector.StretchBounds(o.lowBlock, o.highBlock)
o.blockSelector.StretchBounds(*o.lowBlock, o.highBlock)

o.blockIDs[msg.Clock.Number] = msg.Clock.Id
for _, output := range msg.AllModuleOutputs() {
Expand Down

0 comments on commit bfef85c

Please sign in to comment.