fixes formatting

This commit is contained in:
ThatBen 2025-03-24 14:16:12 +01:00
parent a695b0ee31
commit 538be676c2
No known key found for this signature in database
GPG Key ID: E020A7DDCD52E1AB
4 changed files with 5 additions and 11 deletions

View File

@ -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)

View File

@ -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 =

View File

@ -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)

View File

@ -96,4 +96,3 @@ suite "Requeststore":
for id in all:
check:
id in ids