Skip to content

Commit

Permalink
Fix merge master conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
jangko committed Jan 20, 2025
1 parent e9c79ad commit 1e1df66
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nimbus/nimbus_execution_client.nim
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ proc setupMetrics(nimbus: NimbusNode, conf: NimbusConf) =
waitFor nimbus.metricsServer.start()

proc preventLoadingDataDirForTheWrongNetwork(db: CoreDbRef; conf: NimbusConf) =
proc writeDataDirId(kvt: CoreDbKvtRef, calculatedId: Hash32) =
proc writeDataDirId(kvt: CoreDbTxRef, calculatedId: Hash32) =
info "Writing data dir ID", ID=calculatedId
kvt.put(dataDirIdKey().toOpenArray, calculatedId.data).isOkOr:
fatal "Cannot write data dir ID", ID=calculatedId
quit(QuitFailure)

let
kvt = db.baseTxFrame()
calculatedId = calcHash(conf.networkId, conf.networkParams)
Expand All @@ -173,7 +173,7 @@ proc preventLoadingDataDirForTheWrongNetwork(db: CoreDbRef; conf: NimbusConf) =
if conf.rewriteDatadirId:
writeDataDirId(kvt, calculatedId)
return

if calculatedId.data != dataDirIdBytes:
fatal "Data dir already initialized with other network configuration",
get=dataDirIdBytes.toHex,
Expand Down

0 comments on commit 1e1df66

Please sign in to comment.