Skip to content

Commit

Permalink
fix(db): enforce transaction blocks output lookup sort order (#730)
Browse files Browse the repository at this point in the history
Enforce transaction blocks output lookup sort order
  • Loading branch information
Alexandcoats authored Sep 23, 2022
1 parent fd6ea1f commit aeddb04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/db/collections/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ impl BlockCollection {
"localField": "_id",
"foreignField": "metadata.block_id",
"pipeline": [
{ "$sort": { "_id": 1 } },
{ "$replaceWith": "$output" }
],
"as": "block.payload.essence.outputs"
Expand Down Expand Up @@ -226,6 +227,7 @@ impl BlockCollection {
"localField": "_id",
"foreignField": "metadata.block_id",
"pipeline": [
{ "$sort": { "_id": 1 } },
{ "$replaceWith": "$output" }
],
"as": "block.payload.essence.outputs"
Expand Down Expand Up @@ -261,6 +263,7 @@ impl BlockCollection {
"localField": "_id",
"foreignField": "metadata.block_id",
"pipeline": [
{ "$sort": { "_id": 1 } },
{ "$replaceWith": "$output" }
],
"as": "block.payload.essence.outputs"
Expand Down

0 comments on commit aeddb04

Please sign in to comment.