From ffccc42f3ed8c5a61fd351920967cddbe43b7087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Irmak?= Date: Tue, 26 Dec 2023 15:41:48 +0300 Subject: [PATCH] Fallback to GW for 0.12.3 blocks as well (#1603) --- rpc/handlers.go | 2 +- rpc/handlers_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rpc/handlers.go b/rpc/handlers.go index 10d1eb8da1..11d9ea3938 100644 --- a/rpc/handlers.go +++ b/rpc/handlers.go @@ -1519,7 +1519,7 @@ func (h *Handler) LegacyTraceBlockTransactions(ctx context.Context, id BlockID) return h.traceBlockTransactions(ctx, block, true) } -var traceFallbackVersion = semver.MustParse("0.12.2") +var traceFallbackVersion = semver.MustParse("0.12.3") func prependBlockHashToState(bc blockchain.Reader, blockNumber uint64, state core.StateReader) (core.StateReader, error) { stateDiffWithBlockHash, err := blockchain.MakeStateDiffForEmptyBlock(bc, blockNumber) diff --git a/rpc/handlers_test.go b/rpc/handlers_test.go index 2d0f0e526b..504618d91b 100644 --- a/rpc/handlers_test.go +++ b/rpc/handlers_test.go @@ -3153,7 +3153,7 @@ func TestTraceTransaction(t *testing.T) { ParentHash: utils.HexToFelt(t, "0x0"), Number: 0, SequencerAddress: utils.HexToFelt(t, "0X111"), - ProtocolVersion: "0.12.3", + ProtocolVersion: "99.12.3", } block := &core.Block{ Header: header, @@ -3270,7 +3270,7 @@ func TestTraceBlockTransactions(t *testing.T) { ParentHash: utils.HexToFelt(t, "0x0C3"), Number: 0, GasPrice: utils.HexToFelt(t, "0x777"), - ProtocolVersion: "0.12.3", + ProtocolVersion: "99.12.3", } l1Tx := &core.L1HandlerTransaction{ TransactionHash: utils.HexToFelt(t, "0x000000C"), @@ -3325,7 +3325,7 @@ func TestTraceBlockTransactions(t *testing.T) { Number: 0, SequencerAddress: utils.HexToFelt(t, "0X111"), GasPrice: utils.HexToFelt(t, "0x777"), - ProtocolVersion: "0.12.3", + ProtocolVersion: "99.12.3", } block := &core.Block{ Header: header, @@ -3649,7 +3649,7 @@ func TestThrottledVMError(t *testing.T) { ParentHash: utils.HexToFelt(t, "0x0C3"), Number: 0, GasPrice: utils.HexToFelt(t, "0x777"), - ProtocolVersion: "0.12.3", + ProtocolVersion: "99.12.3", } l1Tx := &core.L1HandlerTransaction{ TransactionHash: utils.HexToFelt(t, "0x000000C"),