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