mirror of
https://github.com/logos-storage/logos-storage-network-crawler.git
synced 2026-01-03 22:13:09 +00:00
fixes formatting
This commit is contained in:
parent
a695b0ee31
commit
538be676c2
@ -78,6 +78,4 @@ proc new*(
|
|||||||
store: RequestStore,
|
store: RequestStore,
|
||||||
marketplace: MarketplaceService,
|
marketplace: MarketplaceService,
|
||||||
): ChainMetrics =
|
): ChainMetrics =
|
||||||
ChainMetrics(
|
ChainMetrics(state: state, metrics: metrics, store: store, marketplace: marketplace)
|
||||||
state: state, metrics: metrics, store: store, marketplace: marketplace
|
|
||||||
)
|
|
||||||
|
|||||||
@ -55,9 +55,7 @@ proc decode*(T: type RequestEntry, bytes: seq[byte]): ?!T =
|
|||||||
return success(RequestEntry(isValid: false))
|
return success(RequestEntry(isValid: false))
|
||||||
return RequestEntry.fromBytes(bytes)
|
return RequestEntry.fromBytes(bytes)
|
||||||
|
|
||||||
method add*(
|
method add*(s: RequestStore, rid: Rid): Future[?!void] {.async: (raises: []), base.} =
|
||||||
s: RequestStore, rid: Rid
|
|
||||||
): Future[?!void] {.async: (raises: []), base.} =
|
|
||||||
without key =? Key.init(requeststoreName / $rid), err:
|
without key =? Key.init(requeststoreName / $rid), err:
|
||||||
error "failed to format key", err = err.msg
|
error "failed to format key", err = err.msg
|
||||||
return failure(err)
|
return failure(err)
|
||||||
@ -110,9 +108,7 @@ method iterateAll*(
|
|||||||
return failure(exc.msg)
|
return failure(exc.msg)
|
||||||
return success()
|
return success()
|
||||||
|
|
||||||
proc new*(
|
proc new*(T: type RequestStore, state: State, store: TypedDatastore): RequestStore =
|
||||||
T: type RequestStore, state: State, store: TypedDatastore
|
|
||||||
): RequestStore =
|
|
||||||
RequestStore(state: state, store: store)
|
RequestStore(state: state, store: store)
|
||||||
|
|
||||||
proc createRequestStore*(state: State): ?!RequestStore =
|
proc createRequestStore*(state: State): ?!RequestStore =
|
||||||
|
|||||||
@ -33,7 +33,8 @@ proc fetchRequestInfo(
|
|||||||
try:
|
try:
|
||||||
let request = await market.getRequest(rid)
|
let request = await market.getRequest(rid)
|
||||||
if r =? request:
|
if r =? request:
|
||||||
return some(RequestInfo(pending: false, slots: r.ask.slots, slotSize: r.ask.slotSize))
|
return
|
||||||
|
some(RequestInfo(pending: false, slots: r.ask.slots, slotSize: r.ask.slotSize))
|
||||||
except CatchableError as exc:
|
except CatchableError as exc:
|
||||||
trace "Failed to get request info", err = exc.msg
|
trace "Failed to get request info", err = exc.msg
|
||||||
return none(RequestInfo)
|
return none(RequestInfo)
|
||||||
|
|||||||
@ -96,4 +96,3 @@ suite "Requeststore":
|
|||||||
for id in all:
|
for id in all:
|
||||||
check:
|
check:
|
||||||
id in ids
|
id in ids
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user