From 4867585fb596ba018ba06ee7db1b3d3e1bdf44d5 Mon Sep 17 00:00:00 2001 From: qybdyx Date: Thu, 8 Jan 2026 10:45:07 +0800 Subject: [PATCH] fix suit_test: only set HistoryStorageAddress nonce on BSC chains during Prague activation --- core/systemcontracts/upgrade.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/systemcontracts/upgrade.go b/core/systemcontracts/upgrade.go index 0751897c27..0ef6eef11c 100644 --- a/core/systemcontracts/upgrade.go +++ b/core/systemcontracts/upgrade.go @@ -1063,7 +1063,7 @@ func TryUpdateBuildInSystemContract(config *params.ChainConfig, blockNumber *big upgradeBuildInSystemContract(config, blockNumber, lastBlockTime, blockTime, statedb) } // HistoryStorageAddress is a special system contract in bsc, which can't be upgraded - if config.IsOnPrague(blockNumber, lastBlockTime, blockTime) { + if config.IsInBSC() && config.IsOnPrague(blockNumber, lastBlockTime, blockTime) { statedb.SetCode(params.HistoryStorageAddress, params.HistoryStorageCode, tracing.CodeChangeSystemContractUpgrade) statedb.SetNonce(params.HistoryStorageAddress, 1, tracing.NonceChangeNewContract) log.Info("Set code for HistoryStorageAddress", "blockNumber", blockNumber.Int64(), "blockTime", blockTime)