Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

chore: update check transaction task #352

Merged
merged 2 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const (
xPubIDField = "xpub_id"
xPubMetadataField = "xpub_metadata"
blockHeightField = "block_height"
blockHashField = "block_hash"

// Universal statuses
statusCanceled = "canceled"
Expand Down
6 changes: 5 additions & 1 deletion model_transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,11 @@ func processTransactions(ctx context.Context, maxTransactions int, opts ...Model
}

conditions := map[string]interface{}{
blockHeightField: 0,
"$or": []map[string]interface{}{{
blockHeightField: 0,
}, {
blockHeightField: nil,
}},
}

records := make([]Transaction, 0)
Expand Down
2 changes: 1 addition & 1 deletion tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,5 @@ func taskCheckTransactions(ctx context.Context, logClient zLogger.GormLoggerInte

logClient.Info(ctx, "running check transaction(s) task...")

return processTransactions(ctx, 10, opts...)
return processTransactions(ctx, 1000, opts...)
}