Skip to content

Commit 125cf9b

Browse files
committed
chore(sales): log error when datasets size is different then expected
1 parent 703921d commit 125cf9b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

codex/sales/states/downloading.nim

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ method run*(
7575
return some State(SaleErrored(error: err, reprocessSlot: false))
7676

7777
trace "Download complete"
78+
without keyId =? reservation.key, error:
79+
error "Couldn't get reservation key", id = $reservation.id, error = error.msg
80+
81+
if updatedReservation =? await reservations.get(keyId, Reservation):
82+
if updatedReservation.size != 0:
83+
error "After downloading the data there is unused capacity in Reservation"
84+
else:
85+
error "Couldn't get updated reservation"
86+
7887
return some State(SaleInitialProving())
7988
except CancelledError as e:
8089
trace "SaleDownloading.run was cancelled", error = e.msgDetail

0 commit comments

Comments
 (0)