Fix missing disabling of `eth` service (#2199)
why: Otherwise it might crash on a not fully initialised call back function when most other functions are disabled during the early sync state.
This commit is contained in:
parent
de0388919f
commit
bc8e3c02ee
|
@ -610,6 +610,10 @@ method handleNewBlock*(ctx: EthWireRef,
|
|||
totalDifficulty: DifficultyInt):
|
||||
Result[void, string]
|
||||
{.gcsafe.} =
|
||||
if ctx.enableTxPool != Enabled:
|
||||
when trMissingOrDisabledGossipOk:
|
||||
notEnabled("handleNewBlock")
|
||||
return ok()
|
||||
try:
|
||||
if ctx.chain.com.forkGTE(MergeFork):
|
||||
debug "Dropping peer for sending NewBlock after merge (EIP-3675)",
|
||||
|
@ -632,6 +636,10 @@ method handleNewBlockHashes*(ctx: EthWireRef,
|
|||
hashes: openArray[NewBlockHashesAnnounce]):
|
||||
Result[void, string]
|
||||
{.gcsafe.} =
|
||||
if ctx.enableTxPool != Enabled:
|
||||
when trMissingOrDisabledGossipOk:
|
||||
notEnabled("handleNewBlockHashes")
|
||||
return ok()
|
||||
try:
|
||||
if ctx.chain.com.forkGTE(MergeFork):
|
||||
debug "Dropping peer for sending NewBlockHashes after merge (EIP-3675)",
|
||||
|
|
Loading…
Reference in New Issue