core: don't modify the shared chainId in tests

This commit is contained in:
jsvisa 2025-10-25 00:27:11 +08:00
parent 074d7b79c1
commit 64a7cecbaf

View file

@ -455,7 +455,7 @@ func verkleTestGenesis(config *params.ChainConfig) *Genesis {
func TestProcessVerkleContractWithEmptyCode(t *testing.T) {
// The test txs were taken from a secondary testnet with chain id 69421
config := *testKaustinenLikeChainConfig
config.ChainID.SetUint64(69421)
config.ChainID = new(big.Int).SetUint64(69421)
gspec := verkleTestGenesis(&config)
genesisH, _, _, _, _, statediffs := GenerateVerkleChainWithGenesis(gspec, beacon.New(ethash.NewFaker()), 1, func(i int, gen *BlockGen) {
@ -511,7 +511,7 @@ func TestProcessVerkleContractWithEmptyCode(t *testing.T) {
func TestProcessVerkleExtCodeHashOpcode(t *testing.T) {
// The test txs were taken from a secondary testnet with chain id 69421
config := *testKaustinenLikeChainConfig
config.ChainID.SetUint64(69421)
config.ChainID = new(big.Int).SetUint64(69421)
var (
signer = types.LatestSigner(&config)
@ -615,7 +615,7 @@ func TestProcessVerkleExtCodeHashOpcode(t *testing.T) {
func TestProcessVerkleBalanceOpcode(t *testing.T) {
// The test txs were taken from a secondary testnet with chain id 69421
config := *testKaustinenLikeChainConfig
config.ChainID.SetUint64(69421)
config.ChainID = new(big.Int).SetUint64(69421)
var (
signer = types.LatestSigner(&config)
@ -672,7 +672,7 @@ func TestProcessVerkleBalanceOpcode(t *testing.T) {
func TestProcessVerkleSelfDestructInSeparateTx(t *testing.T) {
// The test txs were taken from a secondary testnet with chain id 69421
config := *testKaustinenLikeChainConfig
config.ChainID.SetUint64(69421)
config.ChainID = new(big.Int).SetUint64(69421)
var (
signer = types.LatestSigner(&config)
@ -792,7 +792,7 @@ func TestProcessVerkleSelfDestructInSeparateTx(t *testing.T) {
func TestProcessVerkleSelfDestructInSameTx(t *testing.T) {
// The test txs were taken from a secondary testnet with chain id 69421
config := *testKaustinenLikeChainConfig
config.ChainID.SetUint64(69421)
config.ChainID = new(big.Int).SetUint64(69421)
var (
signer = types.LatestSigner(&config)
@ -888,7 +888,7 @@ func TestProcessVerkleSelfDestructInSameTx(t *testing.T) {
func TestProcessVerkleSelfDestructInSeparateTxWithSelfBeneficiary(t *testing.T) {
// The test txs were taken from a secondary testnet with chain id 69421
config := *testKaustinenLikeChainConfig
config.ChainID.SetUint64(69421)
config.ChainID = new(big.Int).SetUint64(69421)
var (
signer = types.LatestSigner(&config)
@ -978,7 +978,7 @@ func TestProcessVerkleSelfDestructInSeparateTxWithSelfBeneficiary(t *testing.T)
func TestProcessVerkleSelfDestructInSameTxWithSelfBeneficiary(t *testing.T) {
// The test txs were taken from a secondary testnet with chain id 69421
config := *testKaustinenLikeChainConfig
config.ChainID.SetUint64(69421)
config.ChainID = new(big.Int).SetUint64(69421)
var (
signer = types.LatestSigner(&config)
@ -1042,7 +1042,7 @@ func TestProcessVerkleSelfDestructInSameTxWithSelfBeneficiary(t *testing.T) {
func TestProcessVerkleSelfDestructInSameTxWithSelfBeneficiaryAndPrefundedAccount(t *testing.T) {
// The test txs were taken from a secondary testnet with chain id 69421
config := *testKaustinenLikeChainConfig
config.ChainID.SetUint64(69421)
config.ChainID = new(big.Int).SetUint64(69421)
var (
signer = types.LatestSigner(&config)