Expose config and node via getters

This commit is contained in:
Arnaud 2025-09-16 15:44:53 +02:00 committed by Eric
parent 1b40e358c8
commit 5a0da42ca5
No known key found for this signature in database

View File

@ -51,7 +51,7 @@ logScope:
type
CodexServer* = ref object
config*: CodexConf
config: CodexConf
restServer: RestServerRef
codexNode: CodexNodeRef
repoStore: RepoStore
@ -61,6 +61,12 @@ type
CodexPrivateKey* = libp2p.PrivateKey # alias
EthWallet = ethers.Wallet
func config*(self: CodexServer): CodexConf =
return self.config
func node*(self: CodexServer): CodexNodeRef =
return self.codexNode
proc waitForSync(provider: Provider): Future[void] {.async.} =
var sleepTime = 1
trace "Checking sync state of Ethereum provider..."