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

Commit

Permalink
fix(250): return error if broadcasting fail
Browse files Browse the repository at this point in the history
  • Loading branch information
arkadiuszos4chain committed Nov 13, 2023
1 parent b59ead9 commit 186eae8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion record_tx_strategy_external_incoming_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (tx *externalIncomingTx) Execute(ctx context.Context, c ClientInterface, op

logger.Info(ctx, fmt.Sprintf("ExternalIncomingTx.Execute(): start without ITC, TxID: %s", transaction.ID))

if transaction.syncTransaction.BroadcastStatus == SyncStatusReady {
if tx.BroadcastNow || transaction.syncTransaction.BroadcastStatus == SyncStatusReady {
_externalIncomingBroadcast(ctx, logger, transaction) // ignore error, transaction will be broadcaset in a cron task
}

Expand Down
2 changes: 1 addition & 1 deletion sync_tx_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func broadcastSyncTransaction(ctx context.Context, syncTx *SyncTransaction) erro
_bailAndSaveSyncTransaction(
ctx, syncTx, SyncStatusError, syncActionBroadcast, provider, "broadcast error: "+err.Error(),
)
return nil //nolint:nolintlint,nilerr // error is not needed
return err
}

// Create status message
Expand Down

0 comments on commit 186eae8

Please sign in to comment.