From 6f32c734a0d4cd60ee5311b7588c822831443518 Mon Sep 17 00:00:00 2001 From: Pedro Miranda Date: Tue, 3 Dec 2024 10:56:56 +0000 Subject: [PATCH] Initial changes required by nimbus suite (aka "unified") --- beacon_chain/nimbus_beacon_node.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beacon_chain/nimbus_beacon_node.nim b/beacon_chain/nimbus_beacon_node.nim index 1a5337dd6..8920d1dfb 100644 --- a/beacon_chain/nimbus_beacon_node.nim +++ b/beacon_chain/nimbus_beacon_node.nim @@ -1869,7 +1869,7 @@ proc onSlotStart(node: BeaconNode, wallTime: BeaconTime, proc onSecond(node: BeaconNode, time: Moment) = # Nim GC metrics (for the main thread) - updateThreadMetrics() + # updateThreadMetrics() if node.config.stopAtSyncedEpoch != 0 and node.dag.head.slot.epoch >= node.config.stopAtSyncedEpoch: @@ -2328,7 +2328,7 @@ when not defined(windows): asyncSpawn statusBarUpdatesPollingLoop() -proc doRunBeaconNode(config: var BeaconNodeConf, rng: ref HmacDrbgContext) {.raises: [CatchableError].} = +proc doRunBeaconNode*(config: var BeaconNodeConf, rng: ref HmacDrbgContext) {.raises: [CatchableError].} = info "Launching beacon node", version = fullVersionStr, bls_backend = $BLS_BACKEND, @@ -2364,7 +2364,7 @@ proc doRunBeaconNode(config: var BeaconNodeConf, rng: ref HmacDrbgContext) {.rai # Nim GC metrics (for the main thread) will be collected in onSecond(), but # we disable piggy-backing on other metrics here. - setSystemMetricsAutomaticUpdate(false) + # setSystemMetricsAutomaticUpdate(false) # There are no managed event loops in here, to do a graceful shutdown, but # letting the default Ctrl+C handler exit is safe, since we only read from @@ -2548,7 +2548,7 @@ proc handleStartUpCmd(config: var BeaconNodeConf) {.raises: [CatchableError].} = {.pop.} # TODO moduletests exceptions -programMain: +when isMainModule: var config = makeBannerAndConfig(clientId, copyrights, nimBanner, SPEC_VERSION, [], BeaconNodeConf).valueOr: stderr.write error