diff --git a/definitions.go b/definitions.go index cf14d179..5102def8 100644 --- a/definitions.go +++ b/definitions.go @@ -110,6 +110,7 @@ const ( xPubIDField = "xpub_id" xPubMetadataField = "xpub_metadata" blockHeightField = "block_height" + blockHashField = "block_hash" // Universal statuses statusCanceled = "canceled" diff --git a/model_transactions.go b/model_transactions.go index 1bbfe69d..8094ea08 100644 --- a/model_transactions.go +++ b/model_transactions.go @@ -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) diff --git a/tasks.go b/tasks.go index 56e8fd27..dd771f4a 100644 --- a/tasks.go +++ b/tasks.go @@ -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...) }