Skip to content

Commit

Permalink
also attempt to restore transactions marked as deleted
Browse files Browse the repository at this point in the history
Signed-off-by: Arne Rutjes <[email protected]>
  • Loading branch information
arner committed Sep 26, 2024
1 parent 610db2b commit 4584d89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion token/services/auditor/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (cm *Manager) restore(tmsID token.TMSID) error {
if err != nil {
return errors.WithMessagef(err, "failed to get auditor for [%s]", tmsID)
}
it, err := auditor.auditDB.TokenRequests(auditdb.QueryTokenRequestsParams{Statuses: []TxStatus{auditdb.Pending, auditdb.Unknown}})
it, err := auditor.auditDB.TokenRequests(auditdb.QueryTokenRequestsParams{Statuses: []TxStatus{auditdb.Pending, auditdb.Unknown, auditdb.Deleted}})
if err != nil {
return errors.Errorf("failed to get tx iterator for [%s]", tmsID)
}
Expand Down
2 changes: 1 addition & 1 deletion token/services/ttx/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (m *Manager) RestoreTMS(tmsID token.TMSID) error {
return errors.WithMessagef(err, "failed to get db for [%s:%s]", tmsID.Network, tmsID.Channel)
}

it, err := db.ttxDB.TokenRequests(ttxdb.QueryTokenRequestsParams{Statuses: []TxStatus{driver.Pending, driver.Unknown}})
it, err := db.ttxDB.TokenRequests(ttxdb.QueryTokenRequestsParams{Statuses: []TxStatus{driver.Pending, driver.Unknown, driver.Deleted}})
if err != nil {
return errors.WithMessagef(err, "failed to get tx iterator for [%s:%s:%s]", tmsID.Network, tmsID.Channel, tmsID)
}
Expand Down

0 comments on commit 4584d89

Please sign in to comment.