mirror of
https://github.com/eosswedenorg/thalos
synced 2026-08-30 20:58:12 +02:00
internal/server/ship_processor.go: fix a bug where blockResult.Deltas whas not properly nil checked. Resulting in panic if accessed
This commit is contained in:
parent
c02cff0e05
commit
cc754ee976
1 changed files with 33 additions and 31 deletions
|
|
@ -249,6 +249,7 @@ func (processor *ShipProcessor) processBlock(blockResult *ship.GetBlocksResultV0
|
|||
}
|
||||
|
||||
// Process deltas
|
||||
if blockResult.Deltas != nil {
|
||||
deltas := []ship.TableDelta{}
|
||||
if err := blockResult.Deltas.Unpack(&deltas); err != nil {
|
||||
mainLogger.WithError(err).Error("Failed to unpack table deltas")
|
||||
|
|
@ -296,6 +297,7 @@ func (processor *ShipProcessor) processBlock(blockResult *ship.GetBlocksResultV0
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
err := processor.queue.Flush()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue