From 5439978a377013a3e951f48915300b56a3010d3c Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Sun, 19 Jun 2022 07:54:35 +0200 Subject: [PATCH] only process deposits if merkleizer available (#3774) `m.depositsChain.blocks.len` may change during `startEth1Syncing`. If that happened, an additional check now ensures that `scratchMerkleizer` was initialized before attempting to use it. --- beacon_chain/eth1/eth1_monitor.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_chain/eth1/eth1_monitor.nim b/beacon_chain/eth1/eth1_monitor.nim index c080cfb78..b84758d5c 100644 --- a/beacon_chain/eth1/eth1_monitor.nim +++ b/beacon_chain/eth1/eth1_monitor.nim @@ -1469,7 +1469,7 @@ proc startEth1Syncing(m: Eth1Monitor, delayBeforeStart: Duration) {.async.} = m.terminalBlockHash = some terminalBlockCandidate.hash m.terminalBlockNumber = some terminalBlockCandidate.number - if shouldProcessDeposits: + if shouldProcessDeposits and scratchMerkleizer != nil: if m.latestEth1BlockNumber <= m.cfg.ETH1_FOLLOW_DISTANCE: continue