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

Commit

Permalink
Merge pull request #567 from BuxOrg/fix-000-failed-outgoing-broadcast
Browse files Browse the repository at this point in the history
fix: try broadcast outgoing tx again
  • Loading branch information
arkadiuszos4chain authored Feb 2, 2024
2 parents fbb4bba + 4145d54 commit ba6cea9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cron_job_declarations.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ func (c *Client) cronJobs() taskmanager.CronJobs {
Handler: handler(taskCleanupDraftTransactions),
},
CronJobNameIncomingTransaction: {
Period: 30 * time.Second,
Period: 2 * time.Minute,
Handler: handler(taskProcessIncomingTransactions),
},
CronJobNameSyncTransactionBroadcast: {
Period: 30 * time.Second,
Period: 2 * time.Minute,
Handler: handler(taskBroadcastTransactions),
},
CronJobNameSyncTransactionSync: {
Period: 120 * time.Second,
Period: 5 * time.Minute,
Handler: handler(taskSyncTransactions),
},
}
Expand Down
4 changes: 1 addition & 3 deletions sync_tx_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ func broadcastSyncTransaction(ctx context.Context, syncTx *SyncTransaction) erro
if provider, err = syncTx.Client().Chainstate().Broadcast(
ctx, syncTx.ID, txHex, defaultBroadcastTimeout,
); err != nil {
_bailAndSaveSyncTransaction(
ctx, syncTx, SyncStatusError, syncActionBroadcast, provider, "broadcast error: "+err.Error(),
)
_bailAndSaveSyncTransaction(ctx, syncTx, SyncStatusReady, syncActionBroadcast, provider, err.Error())
return err
}

Expand Down

0 comments on commit ba6cea9

Please sign in to comment.