Skip to content

Commit

Permalink
internal/server/ship_processor.go: fix a bug where TableDeltaRow.Data…
Browse files Browse the repository at this point in the history
… was not set
  • Loading branch information
pnx committed May 17, 2024
1 parent 59bcc9f commit c02cff0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/server/ship_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,11 @@ func (processor *ShipProcessor) processBlock(blockResult *ship.GetBlocksResultV0

v, err := processor.shipABI.Decode(bytes.NewReader(row.Data), delta.V0.Name)
if err == nil {
var ok bool
if msg.Data, ok = v.(map[string]any); !ok {
// logger.Error("Failed to cast table data")
v, err := parseTableDeltaData(v)
if err == nil {
msg.Data = v
} else {
logger.WithError(err).Error("Failed to parse table delta data")
}
} else {
logger.Error("Failed to decode table delta")
Expand Down

0 comments on commit c02cff0

Please sign in to comment.