mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-07 07:53:07 +00:00
Apply suggestion changes for until dates
This commit is contained in:
parent
b64aa5042b
commit
a18e879705
@ -484,7 +484,7 @@ method createReservation*(
|
||||
let error = newException(ReservationsError, "Cannot cast duration to int64")
|
||||
return failure(error)
|
||||
|
||||
let validUntil = times.now().utc().toTime().toUnix() + duration.SecondsSince1970
|
||||
let validUntil = getTime().toUnix() + duration.SecondsSince1970
|
||||
|
||||
trace "Creating reservation",
|
||||
availabilityId, slotSize, requestId, slotIndex, validUntil = validUntil
|
||||
|
||||
@ -405,7 +405,7 @@ asyncchecksuite "Reservations module":
|
||||
|
||||
test "finds an availability when the until date is after the duration":
|
||||
let example = Availability.example(collateralPerByte)
|
||||
let until = getTime().toUnix() + cast[int64](example.duration)
|
||||
let until = getTime().toUnix() + example.duration.SecondsSince1970
|
||||
let availability = createAvailability(until = until)
|
||||
|
||||
let found = await reservations.findAvailability(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user