From 0f417263c656a4ef4d28f3dfc1a84b79fae73650 Mon Sep 17 00:00:00 2001 From: Andrei Date: Thu, 12 Dec 2024 01:09:51 +0400 Subject: [PATCH] Remove unused code --- adapters/vm2core/vm2core.go | 34 -------------------------------- adapters/vm2core/vm2core_test.go | 32 ------------------------------ 2 files changed, 66 deletions(-) diff --git a/adapters/vm2core/vm2core.go b/adapters/vm2core/vm2core.go index 3646bd98b1..dc505e86d1 100644 --- a/adapters/vm2core/vm2core.go +++ b/adapters/vm2core/vm2core.go @@ -10,29 +10,6 @@ import ( "github.com/ethereum/go-ethereum/common" ) -func AdaptExecutionResources(resources *vm.ExecutionResources) *core.ExecutionResources { - return &core.ExecutionResources{ - BuiltinInstanceCounter: core.BuiltinInstanceCounter{ - Pedersen: resources.Pedersen, - RangeCheck: resources.RangeCheck, - Bitwise: resources.Bitwise, - Ecsda: resources.Ecdsa, - EcOp: resources.EcOp, - Keccak: resources.Keccak, - Poseidon: resources.Poseidon, - SegmentArena: resources.SegmentArena, - Output: resources.Output, - AddMod: resources.AddMod, - MulMod: resources.MulMod, - RangeCheck96: resources.RangeCheck96, - }, - MemoryHoles: resources.MemoryHoles, - Steps: resources.Steps, - DataAvailability: adaptDA(resources.DataAvailability), - TotalGasConsumed: nil, // todo: fill after 0.13.2 - } -} - func AdaptOrderedEvent(event vm.OrderedEvent) *core.Event { return &core.Event{ From: event.From, @@ -62,14 +39,3 @@ func AdaptOrderedEvents(events []vm.OrderedEvent) []*core.Event { }) return utils.Map(events, AdaptOrderedEvent) } - -func adaptDA(da *vm.DataAvailability) *core.DataAvailability { - if da == nil { - return nil - } - - return &core.DataAvailability{ - L1Gas: da.L1Gas, - L1DataGas: da.L1DataGas, - } -} diff --git a/adapters/vm2core/vm2core_test.go b/adapters/vm2core/vm2core_test.go index 168cfa07e7..2a32af8641 100644 --- a/adapters/vm2core/vm2core_test.go +++ b/adapters/vm2core/vm2core_test.go @@ -68,35 +68,3 @@ func TestAdaptOrderedMessagesToL1(t *testing.T) { vm2core.AdaptOrderedMessageToL1(messages[0]), }, vm2core.AdaptOrderedMessagesToL1(messages)) } - -func TestAdaptExecutionResources(t *testing.T) { - require.Equal(t, &core.ExecutionResources{ - BuiltinInstanceCounter: core.BuiltinInstanceCounter{ - Pedersen: 1, - RangeCheck: 2, - Bitwise: 3, - Ecsda: 4, - EcOp: 5, - Keccak: 6, - Poseidon: 7, - SegmentArena: 8, - Output: 11, - }, - MemoryHoles: 9, - Steps: 10, - }, vm2core.AdaptExecutionResources(&vm.ExecutionResources{ - ComputationResources: vm.ComputationResources{ - Pedersen: 1, - RangeCheck: 2, - Bitwise: 3, - Ecdsa: 4, - EcOp: 5, - Keccak: 6, - Poseidon: 7, - SegmentArena: 8, - MemoryHoles: 9, - Steps: 10, - Output: 11, - }, - })) -}