Skip to content

Commit

Permalink
Update metadata before processing block
Browse files Browse the repository at this point in the history
  • Loading branch information
khssnv committed May 8, 2024
1 parent 7250c1a commit 689cbd8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions blockchain/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ func (c *Client) StartEventsListening(
continue
}

meta, err := c.RPC.State.GetMetadata(set.Block)
if err != nil {
c.errsListening <- fmt.Errorf("get metadata: %w", err)
return
}

for _, change := range set.Changes {
if !codec.Eq(change.StorageKey, key) || !change.HasStorageData {
continue
Expand Down

0 comments on commit 689cbd8

Please sign in to comment.