Skip to content

Commit

Permalink
remove not necessary data
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBger committed Nov 7, 2024
1 parent 3c9bcd7 commit 3cdf12c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,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).

## v4.2.2

* Fix major bug when receiving empty `MapOutput`

## v4.2.1

* Bump substreams to v1.10.3 to support new manifest data like `protobuf:excludePaths`
Expand Down
4 changes: 2 additions & 2 deletions sinker/sinker.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (s *SQLSinker) HandleBlockScopedData(ctx context.Context, data *pbsubstream
}
}

if data.Clock.Number%s.batchBlockModulo(data, isLive) == 0 {
if data.Clock.Number%s.batchBlockModulo(isLive) == 0 {
s.logger.Debug("flushing to database", zap.Stringer("block", cursor.Block()), zap.Bool("is_live", *isLive))

flushStart := time.Now()
Expand Down Expand Up @@ -213,7 +213,7 @@ func (s *SQLSinker) HandleBlockUndoSignal(ctx context.Context, data *pbsubstream
return s.loader.Revert(ctx, s.OutputModuleHash(), cursor, data.LastValidBlock.Number)
}

func (s *SQLSinker) batchBlockModulo(blockData *pbsubstreamsrpc.BlockScopedData, isLive *bool) uint64 {
func (s *SQLSinker) batchBlockModulo(isLive *bool) uint64 {
if isLive == nil {
panic(fmt.Errorf("liveness checker has been disabled on the Sinker instance, this is invalid in the context of 'substreams-sink-sql'"))
}
Expand Down

0 comments on commit 3cdf12c

Please sign in to comment.