Skip to content

Commit

Permalink
invert expiration checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Coats committed Jan 18, 2024
1 parent 86dc2a2 commit 09cab3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/db/mongodb/collections/outputs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ impl OutputCollection {
"$cond": [
{ "$or": [
{ "$eq": [ "$details.address", &address ] },
{ "$not": { "$lt": [ "$output.expiration_unlock_condition.timestamp", ledger_ms.milestone_timestamp ] } }
{ "$not": { "$gt": [ "$output.expiration_unlock_condition.timestamp", ledger_ms.milestone_timestamp ] } }
] },
{ "$toDecimal": "$output.amount" }, 0
]
Expand All @@ -459,7 +459,7 @@ impl OutputCollection {
] },
{ "$and": [
{ "$eq": [ "$output.expiration_unlock_condition.return_address", &address ] },
{ "$gt": [ "$output.expiration_unlock_condition.timestamp", ledger_ms.milestone_timestamp ] }
{ "$lt": [ "$output.expiration_unlock_condition.timestamp", ledger_ms.milestone_timestamp ] }
] },
] },
{ "$toDecimal": "$output.amount" }, 0
Expand Down

0 comments on commit 09cab3c

Please sign in to comment.