mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-01-11 05:26:24 +00:00
Merge branch 'master' into feature/blkexc-peer-selection
This commit is contained in:
commit
7e4182ef12
@ -189,14 +189,16 @@ asyncchecksuite "Sales":
|
|||||||
await repoTmp.destroyDb()
|
await repoTmp.destroyDb()
|
||||||
await metaTmp.destroyDb()
|
await metaTmp.destroyDb()
|
||||||
|
|
||||||
proc isInState(idx: int, state: string): Future[bool] {.async.} =
|
proc isInState(idx: int, state: string): bool =
|
||||||
proc description(state: State): string =
|
proc description(state: State): string =
|
||||||
$state
|
$state
|
||||||
check eventually sales.agents.len > idx
|
|
||||||
|
if idx >= sales.agents.len:
|
||||||
|
return false
|
||||||
sales.agents[idx].query(description) == state.some
|
sales.agents[idx].query(description) == state.some
|
||||||
|
|
||||||
proc allowRequestToStart {.async.} =
|
proc allowRequestToStart {.async.} =
|
||||||
check eventually (await isInState(0, "SaleInitialProving"))
|
check eventually isInState(0, "SaleInitialProving")
|
||||||
# it won't start proving until the next period
|
# it won't start proving until the next period
|
||||||
await clock.advanceToNextPeriod(market)
|
await clock.advanceToNextPeriod(market)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user