Skip to content

Commit 857a1e4

Browse files
pmmirandapedromiguelmiranda
authored andcommitted
Moved variables declaration to nimbus_binary_common
1 parent 1fcf727 commit 857a1e4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

beacon_chain/nimbus_beacon_node.nim

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,9 +2169,6 @@ proc run(node: BeaconNode) {.raises: [CatchableError].} =
21692169
# time to say goodbye
21702170
node.stop()
21712171

2172-
var shouldCreatePidFile*: Atomic[bool]
2173-
shouldCreatePidFile.store(true)
2174-
21752172
var gPidFile: string
21762173
proc createPidFile(filename: string) {.raises: [IOError].} =
21772174
if shouldCreatePidFile.load():

beacon_chain/nimbus_binary_common.nim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import
1313
# Standard library
14-
std/[tables, strutils, terminal, typetraits],
14+
std/[atomics, tables, strutils, terminal, typetraits],
1515

1616
# Nimble packages
1717
chronos, confutils, presto, toml_serialization, metrics,
@@ -41,6 +41,10 @@ type
4141
lastSlot: Slot): Future[bool] {.gcsafe,
4242
raises: [].}
4343

44+
# controls if beacon node db file lock should be created (default: true)
45+
var shouldCreatePidFile*: Atomic[bool]
46+
shouldCreatePidFile.store(true)
47+
4448
# silly chronicles, colors is a compile-time property
4549
when defaultChroniclesStream.outputs.type.arity == 2:
4650
func stripAnsi(v: string): string =

0 commit comments

Comments
 (0)