Skip to content

Commit 8e37e1f

Browse files
Order receipt query responses by nonce
1 parent 26ed7a8 commit 8e37e1f

File tree

1 file changed

+4
-2
lines changed
  • aggregation_mode/batcher/src

1 file changed

+4
-2
lines changed

aggregation_mode/batcher/src/db.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ impl Db {
7070
sqlx::query_as::<_, Receipt>(
7171
"SELECT status,merkle_path,nonce,address FROM tasks
7272
WHERE address = $1
73-
AND nonce = $2",
73+
AND nonce = $2
74+
ORDER BY nonce DESC",
7475
)
7576
.bind(address.to_lowercase())
7677
.bind(nonce)
@@ -86,7 +87,8 @@ impl Db {
8687
sqlx::query_as::<_, Receipt>(
8788
"SELECT status,merkle_path,nonce,address FROM tasks
8889
WHERE address = $1
89-
LIMIT $2",
90+
LIMIT $2
91+
ORDER BY nonce DESC",
9092
)
9193
.bind(address.to_lowercase())
9294
.bind(limit)

0 commit comments

Comments
 (0)