diff --git a/common/chain.go b/common/chain.go index 284fa5bf7b..189388b6a5 100644 --- a/common/chain.go +++ b/common/chain.go @@ -26,7 +26,7 @@ type Chains []Chain // IsEqual compare two chain to see whether they represent the same chain func (chain Chain) IsEqual(c Chain) bool { - if chain.ChainName == c.ChainName && chain.ChainId == c.ChainId { + if chain.ChainId == c.ChainId { return true } return false diff --git a/contrib/localnet/orchestrator/smoketest/test_block_headers.go b/contrib/localnet/orchestrator/smoketest/test_block_headers.go index 27da832f0d..d0b9749677 100644 --- a/contrib/localnet/orchestrator/smoketest/test_block_headers.go +++ b/contrib/localnet/orchestrator/smoketest/test_block_headers.go @@ -47,6 +47,6 @@ func (sm *SmokeTest) TestBlockHeaders() { } fmt.Printf("block header tracing succeeded; expected at most %d, got %d\n", earliestBlock, bn) } - checkBlock(common.GoerliChain().ChainId) + checkBlock(common.GoerliLocalnetChain().ChainId) checkBlock(common.BtcRegtestChain().ChainId) } diff --git a/contrib/localnet/orchestrator/smoketest/test_deposit_eth.go b/contrib/localnet/orchestrator/smoketest/test_deposit_eth.go index 60f7118df3..3b1194ff9a 100644 --- a/contrib/localnet/orchestrator/smoketest/test_deposit_eth.go +++ b/contrib/localnet/orchestrator/smoketest/test_deposit_eth.go @@ -45,10 +45,13 @@ func (sm *SmokeTest) TestDepositEtherIntoZRC20() { if err != nil { panic(err) } - ethZRC20Addr, err := systemContract.GasCoinZRC20ByChainId(&bind.CallOpts{}, big.NewInt(common.GoerliChain().ChainId)) + ethZRC20Addr, err := systemContract.GasCoinZRC20ByChainId(&bind.CallOpts{}, big.NewInt(common.GoerliLocalnetChain().ChainId)) if err != nil { panic(err) } + if (ethZRC20Addr == ethcommon.Address{}) { + panic("eth zrc20 not found") + } sm.ETHZRC20Addr = ethZRC20Addr fmt.Printf("eth zrc20 address: %s\n", ethZRC20Addr.String()) ethZRC20, err := zrc20.NewZRC20(ethZRC20Addr, sm.zevmClient) @@ -127,7 +130,7 @@ func (sm *SmokeTest) TestDepositEtherIntoZRC20() { TxIndex: int64(txIndex), TxHash: txHash.Hex(), Proof: common.NewEthereumProof(txProof), - ChainId: common.GoerliChain().ChainId, + ChainId: common.GoerliLocalnetChain().ChainId, }) if err != nil { panic(err)