From 02df3f2c42f53c2adfda809b0b896003de2f17c1 Mon Sep 17 00:00:00 2001 From: jagdeep sidhu Date: Tue, 8 Oct 2024 15:43:10 -0700 Subject: [PATCH] Update runtime.go --- core/vm/runtime/runtime.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/core/vm/runtime/runtime.go b/core/vm/runtime/runtime.go index a7f0d15db3..7637289b98 100644 --- a/core/vm/runtime/runtime.go +++ b/core/vm/runtime/runtime.go @@ -111,6 +111,22 @@ func setDefaults(cfg *Config) { return common.BytesToHash(crypto.Keccak256([]byte(new(big.Int).SetUint64(n).String()))) } } + // SYSCOIN + if cfg.ReadSYSHashFn == nil { + cfg.ReadSYSHashFn = func(n uint64) []byte { + return []byte(new(big.Int).SetUint64(n).String()) + } + } + if cfg.ReadDataHashFn == nil { + cfg.ReadDataHashFn = func(hash common.Hash) []byte { + return hash.Bytes() + } + } + if cfg.GetNEVMAddressFn == nil { + cfg.GetNEVMAddressFn = func(address common.Address) []byte { + return address.Bytes() + } + } if cfg.BaseFee == nil { cfg.BaseFee = big.NewInt(params.InitialBaseFee) }