Skip to content

Commit

Permalink
fixed using correct blocks root for batch end (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Staykov authored Jul 26, 2024
1 parent f81e00f commit 9746252
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion zk/datastream/client/stream_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func (c *StreamClient) ReadAllEntriesToChannel() error {
}

// reset the channels as there could be data ahead of the bookmark we want to track here.
c.resetChannels()
// c.resetChannels()

return err2
}
Expand Down
4 changes: 2 additions & 2 deletions zk/datastream/server/data_stream_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ func createBlockWithBatchCheckStreamEntriesProto(
if err != nil {
return nil, err
}
blockRoot := block.Root()
if endEntriesProto, err = addBatchEndEntriesProto(lastBatchNumber, &blockRoot, gers, &localExitRoot); err != nil {
lastBlockRoot := lastBlock.Root()
if endEntriesProto, err = addBatchEndEntriesProto(lastBatchNumber, &lastBlockRoot, gers, &localExitRoot); err != nil {
return nil, err
}
}
Expand Down
1 change: 1 addition & 0 deletions zk/datastream/types/batch_proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func UnmarshalBatchEnd(data []byte) (*BatchEnd, error) {
}

return &BatchEnd{
Number: batchEnd.Number,
LocalExitRoot: libcommon.BytesToHash(batchEnd.LocalExitRoot),
StateRoot: libcommon.BytesToHash(batchEnd.StateRoot),
Debug: ProcessDebug(batchEnd.Debug),
Expand Down

0 comments on commit 9746252

Please sign in to comment.