fix(sync-service): only add queue index when message index is not zero (#682)

* fix(sync-service): increase queue index only when L1 message index is not zero

* bump version

---------

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
This commit is contained in:
colin 2024-03-27 16:53:02 +08:00 committed by GitHub
parent 3cf590b270
commit 61e8de9c3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -24,7 +24,7 @@ import (
const ( const (
VersionMajor = 5 // Major version component of the current release VersionMajor = 5 // Major version component of the current release
VersionMinor = 1 // Minor version component of the current release VersionMinor = 1 // Minor version component of the current release
VersionPatch = 26 // Patch version component of the current release VersionPatch = 27 // Patch version component of the current release
VersionMeta = "mainnet" // Version metadata to append to the version string VersionMeta = "mainnet" // Version metadata to append to the version string
) )

View file

@ -220,7 +220,9 @@ func (s *SyncService) fetchMessages() {
} }
for _, msg := range msgs { for _, msg := range msgs {
queueIndex++ if msg.QueueIndex > 0 {
queueIndex++
}
// check if received queue index matches expected queue index // check if received queue index matches expected queue index
if msg.QueueIndex != queueIndex { if msg.QueueIndex != queueIndex {
log.Error("Unexpected queue index in SyncService", "expected", queueIndex, "got", msg.QueueIndex, "msg", msg) log.Error("Unexpected queue index in SyncService", "expected", queueIndex, "got", msg.QueueIndex, "msg", msg)