From 8850e6cee2d5fe75c3d533bbc78d792744de470e Mon Sep 17 00:00:00 2001 From: Rapol Date: Thu, 19 Sep 2024 07:32:58 +0200 Subject: [PATCH] basefee, blobbasefee now uses BytesValueToBigInt --- protobuf/decode.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/protobuf/decode.go b/protobuf/decode.go index 2a1d991..73116d7 100644 --- a/protobuf/decode.go +++ b/protobuf/decode.go @@ -120,16 +120,6 @@ func (env *Substate_BlockEnv) decode() (*substate.Env, error) { } } - var baseFee *big.Int = nil - if env.GetBaseFee() != nil { - baseFee = types.BytesToBigInt(env.GetBaseFee().GetValue()) - } - - var blobBaseFee *big.Int = nil - if env.GetBlobBaseFee() != nil { - blobBaseFee = types.BytesToBigInt(env.GetBlobBaseFee().GetValue()) - } - return &substate.Env{ Coinbase: types.BytesToAddress(env.GetCoinbase()), Difficulty: types.BytesToBigInt(env.GetDifficulty()), @@ -137,9 +127,9 @@ func (env *Substate_BlockEnv) decode() (*substate.Env, error) { Number: env.GetNumber(), Timestamp: env.GetTimestamp(), BlockHashes: blockHashes, - BaseFee: baseFee, + BaseFee: BytesValueToBigInt(env.GetBaseFee()), Random: BytesValueToHash(env.GetRandom()), - BlobBaseFee: blobBaseFee, + BlobBaseFee: BytesValueToBigInt(env.GetBlobBaseFee()), }, nil }