Skip to content

Commit 3cdf12c

Browse files
committed
remove not necessary data
1 parent 3c9bcd7 commit 3cdf12c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## v4.2.2
9+
10+
* Fix major bug when receiving empty `MapOutput`
11+
812
## v4.2.1
913

1014
* Bump substreams to v1.10.3 to support new manifest data like `protobuf:excludePaths`

sinker/sinker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func (s *SQLSinker) HandleBlockScopedData(ctx context.Context, data *pbsubstream
121121
}
122122
}
123123

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

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

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

0 commit comments

Comments
 (0)