Skip to content

Commit

Permalink
Update beacon_chain/eth1/eth1_monitor.nim
Browse files Browse the repository at this point in the history
Co-authored-by: Etan Kissling <etan@status.im>
  • Loading branch information
tersec and etan-status authored Jun 27, 2022
1 parent fa2df66 commit e5be1e8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions beacon_chain/eth1/eth1_monitor.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1345,15 +1345,15 @@ proc startEth1Syncing(m: Eth1Monitor, delayBeforeStart: Duration) {.async.} =
try:
let
providerChain =
(awaitWithRetries m.dataProvider.web3.provider.eth_chainId()).uint64
awaitWithRetries m.dataProvider.web3.provider.eth_chainId()

# https://eips.ethereum.org/EIPS/eip-155#list-of-chain-ids
expectedChain = case m.eth1Network.get
of mainnet: 1'u64
of ropsten: 3'u64
of rinkeby: 4'u64
of goerli: 5'u64
of sepolia: 11155111'u64 # https://chainid.network/
of mainnet: 1.Quantity
of ropsten: 3.Quantity
of rinkeby: 4.Quantity
of goerli: 5.Quantity
of sepolia: 11155111.Quantity # https://chainid.network/
if expectedChain != providerChain:
fatal "The specified web3 provider serves data for a different chain",
expectedChain, providerChain
Expand Down

0 comments on commit e5be1e8

Please sign in to comment.