mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-14 10:51:35 +00:00
17 lines
303 B
Go
17 lines
303 B
Go
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)
|
|
}
|