From aa0489ae876076f82defa264c81fc9d972b33d17 Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Thu, 9 Apr 2026 09:48:52 +0200 Subject: [PATCH] core: turn gas into a vector --- core/vm/gascosts.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 core/vm/gascosts.go diff --git a/core/vm/gascosts.go b/core/vm/gascosts.go new file mode 100644 index 0000000000..dfca50700a --- /dev/null +++ b/core/vm/gascosts.go @@ -0,0 +1,17 @@ +package vm + +import "fmt" + +type GasCosts struct { + RegularGas uint64 + StateGas uint64 +} + +// Sum returns the total gas (regular + state). +func (g GasCosts) Sum() uint64 { + return g.RegularGas + g.StateGas +} + +func (g GasCosts) String() string { + return fmt.Sprintf("<%v,%v>", g.RegularGas, g.StateGas) +}