mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-07 16:03:13 +00:00
Expose config and node via getters
This commit is contained in:
parent
1dc5a9dbf9
commit
cd4ee2eef9
@ -51,7 +51,7 @@ logScope:
|
|||||||
|
|
||||||
type
|
type
|
||||||
CodexServer* = ref object
|
CodexServer* = ref object
|
||||||
config*: CodexConf
|
config: CodexConf
|
||||||
restServer: RestServerRef
|
restServer: RestServerRef
|
||||||
codexNode: CodexNodeRef
|
codexNode: CodexNodeRef
|
||||||
repoStore: RepoStore
|
repoStore: RepoStore
|
||||||
@ -61,6 +61,12 @@ type
|
|||||||
CodexPrivateKey* = libp2p.PrivateKey # alias
|
CodexPrivateKey* = libp2p.PrivateKey # alias
|
||||||
EthWallet = ethers.Wallet
|
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.} =
|
proc waitForSync(provider: Provider): Future[void] {.async.} =
|
||||||
var sleepTime = 1
|
var sleepTime = 1
|
||||||
trace "Checking sync state of Ethereum provider..."
|
trace "Checking sync state of Ethereum provider..."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user