Don't start the Eth1Monitor when there are no validators attached

This is a temporary revert of the new logic introduced in
d6cd1cd46c, because it leads
to a memory leak in the Eth1Monitor caused by the lack of
pruning of the Eth1Chain when the validator duties are not
executed.
This commit is contained in:
Zahary Karadjov 2021-11-09 12:23:11 +02:00
parent ba42b2b316
commit 200902ccb3
1 changed files with 1 additions and 1 deletions

View File

@ -1162,7 +1162,7 @@ proc start(node: BeaconNode) {.raises: [Defect, CatchableError].} =
waitFor node.initializeNetworking()
if node.eth1Monitor != nil:
if node.eth1Monitor != nil and node.attachedValidators[].count > 0:
node.eth1Monitor.start()
else:
notice "Running without execution chain monitor, block producation partially disabled"