From 0f7a049e26f6657dc876348ca3cdf6f201f21db7 Mon Sep 17 00:00:00 2001 From: sudeep Date: Wed, 19 Apr 2023 16:44:20 +0530 Subject: [PATCH 1/2] withdrawals can be nullable for pre-shanghai --- core/block_replica.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/core/block_replica.go b/core/block_replica.go index 5d7fac09a..2d763d8c8 100644 --- a/core/block_replica.go +++ b/core/block_replica.go @@ -82,11 +82,14 @@ func (bc *BlockChain) createReplica(block *types.Block, replicaConfig *ReplicaCo } // withdrawals - withdrawalsExp := make([]*types.WithdrawalForExport, len(block.Withdrawals())) - withdrawalsRlp := make([]*types.WithdrawalExportRLP, len(block.Withdrawals())) - for i, withdrawal := range block.Withdrawals() { - withdrawalsExp[i] = (*types.WithdrawalForExport)(withdrawal) - withdrawalsRlp[i] = withdrawalsExp[i].ExportWithdrawal() + var withdrawalsRlp []*types.WithdrawalExportRLP = nil + if chainConfig.IsShanghai(block.Time()) { + withdrawalsExp := make([]*types.WithdrawalForExport, len(block.Withdrawals())) + withdrawalsRlp = make([]*types.WithdrawalExportRLP, len(block.Withdrawals())) + for i, withdrawal := range block.Withdrawals() { + withdrawalsExp[i] = (*types.WithdrawalForExport)(withdrawal) + withdrawalsRlp[i] = withdrawalsExp[i].ExportWithdrawal() + } } //receipts From 6d81d508d9f0e1bd9114b0cc4859d6097bd4b378 Mon Sep 17 00:00:00 2001 From: Pranay Valson Date: Wed, 19 Apr 2023 11:03:07 -0700 Subject: [PATCH 2/2] update bsp-geth version Signed-off-by: Pranay Valson --- params/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/params/version.go b/params/version.go index 773f78f5b..1ce0afcb5 100644 --- a/params/version.go +++ b/params/version.go @@ -30,7 +30,7 @@ const ( const ( BspVersionMajor = 1 // Major version component of the current release BspVersionMinor = 4 // Minor version component of the current release - BspVersionPatch = 2 // Patch version component of the current release + BspVersionPatch = 3 // Patch version component of the current release ) // Version holds the textual version string.