diff --git a/go.mod b/go.mod index 72f28eb61..79a7d1e4d 100644 --- a/go.mod +++ b/go.mod @@ -117,4 +117,4 @@ require ( rsc.io/tmplfunc v0.0.3 // indirect ) -replace github.com/ethereum/go-ethereum v1.13.11 => github.com/taikoxyz/taiko-geth v0.0.0-20240207044711-7f625e6a8228 +replace github.com/ethereum/go-ethereum v1.13.11 => github.com/taikoxyz/taiko-geth v0.0.0-20240207045737-1f775750a248 diff --git a/go.sum b/go.sum index d66c3adce..6bc9b2859 100644 --- a/go.sum +++ b/go.sum @@ -407,8 +407,8 @@ github.com/swaggo/swag v1.16.2 h1:28Pp+8DkQoV+HLzLx8RGJZXNGKbFqnuvSbAAtoxiY04= github.com/swaggo/swag v1.16.2/go.mod h1:6YzXnDcpr0767iOejs318CwYkCQqyGer6BizOg03f+E= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/taikoxyz/taiko-geth v0.0.0-20240207044711-7f625e6a8228 h1:gLp/Gr3/VLpoGTwq+irtf685KSpb9aNj3+fzRKEf5M0= -github.com/taikoxyz/taiko-geth v0.0.0-20240207044711-7f625e6a8228/go.mod h1:gFtlVORuUcT+UUIcJ/veCNjkuOSujCi338uSHJrYAew= +github.com/taikoxyz/taiko-geth v0.0.0-20240207045737-1f775750a248 h1:biOi7poktBhAsrkxrvO3Sczs8L6OyvBFtt7lUxdwe7A= +github.com/taikoxyz/taiko-geth v0.0.0-20240207045737-1f775750a248/go.mod h1:gFtlVORuUcT+UUIcJ/veCNjkuOSujCi338uSHJrYAew= github.com/thomaso-mirodin/intmath v0.0.0-20160323211736-5dc6d854e46e h1:cR8/SYRgyQCt5cNCMniB/ZScMkhI9nk8U5C7SbISXjo= github.com/thomaso-mirodin/intmath v0.0.0-20160323211736-5dc6d854e46e/go.mod h1:Tu4lItkATkonrYuvtVjG0/rhy15qrNGNTjPdaphtZ/8= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/internal/testutils/helper.go b/internal/testutils/helper.go index 46834a331..495946da1 100644 --- a/internal/testutils/helper.go +++ b/internal/testutils/helper.go @@ -140,9 +140,8 @@ func ProposeAndInsertValidBlock( s.Nil(err) s.Greater(newL1Head.Number.Uint64(), l1Head.Number.Uint64()) - syncProgress, err := s.RPCClient.L2.SyncProgress(context.Background()) + _, err = s.RPCClient.L2.SyncProgress(context.Background()) s.Nil(err) - s.Nil(syncProgress) ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() diff --git a/pkg/rpc/dial_test.go b/pkg/rpc/dial_test.go index 94630bb6c..f8cdd7dbc 100644 --- a/pkg/rpc/dial_test.go +++ b/pkg/rpc/dial_test.go @@ -32,7 +32,7 @@ func TestDialEngineClientWithBackoff(t *testing.T) { var result engine.ExecutableData err = client.CallContext(context.Background(), &result, "engine_getPayloadV1", engine.PayloadID{}) - require.Equal(t, engine.UnknownPayload.Error(), err.Error()) + require.Equal(t, engine.UnsupportedFork.Error(), err.Error()) } func TestDialClientWithBackoff(t *testing.T) { diff --git a/pkg/rpc/methods.go b/pkg/rpc/methods.go index c5c36906a..5810202a4 100644 --- a/pkg/rpc/methods.go +++ b/pkg/rpc/methods.go @@ -288,8 +288,11 @@ type L2SyncProgress struct { // isSyncing returns true if the L2 execution engine is syncing with L1. func (p *L2SyncProgress) isSyncing() bool { - return p.SyncProgress != nil || - p.CurrentBlockID == nil || + if p.SyncProgress == nil { + return false + } + + return p.CurrentBlockID == nil || p.HighestBlockID == nil || p.CurrentBlockID.Cmp(p.HighestBlockID) < 0 }