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

Commit

Permalink
feat(BUX-291): remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
arkadiuszos4chain committed Nov 13, 2023
1 parent 0d62c78 commit c22938e
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion record_tx_strategy_external_incoming_tx.go
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ func (tx *externalIncomingTx) Execute(ctx context.Context, c ClientInterface, op

if transaction.syncTransaction.BroadcastStatus == SyncStatusReady {
if err = broadcastSyncTransaction(ctx, transaction.syncTransaction); err != nil {
// ignore error, transaction will be broadcaset by cron task - @arkadiusz: to chyba nie do końca prawda
// ignore error, transaction will be broadcaset by cron task
transaction.client.Logger().
Warn(ctx, fmt.Sprintf("ExternalIncomingTx.Execute(): broadcasting failed. Reason: %s", err)) // TODO: add transaction info to log context
}
3 changes: 0 additions & 3 deletions record_tx_strategy_internal_incoming_tx.go
Original file line number Diff line number Diff line change
@@ -12,9 +12,6 @@ type internalIncomingTx struct {
}

func (tx *internalIncomingTx) Execute(ctx context.Context, c ClientInterface, opts []ModelOps) (*Transaction, error) {
// if I'm a classic - can I even be recorded this way?
// if I'm a paymail - I can be broadcasted but not have to, P2P providers are notified for sure

transaction := tx.Tx

// process
2 changes: 1 addition & 1 deletion sync_tx_repository.go
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@ func getTransactionsToBroadcast(ctx context.Context, queryParams *datastore.Quer
if err != nil {
return nil, err
} else if sTx.transaction == nil {
return nil, ErrMissingTransaction // TODO: think about context in error
return nil, ErrMissingTransaction
}

parentsBroadcast, err := _areParentsBroadcasted(ctx, sTx.transaction, opts...)
4 changes: 2 additions & 2 deletions sync_tx_service.go
Original file line number Diff line number Diff line change
@@ -128,7 +128,7 @@ func processP2PTransactions(ctx context.Context, maxTransactions int, opts ...Mo
return nil
}

// broadcastSyncTransaction will process a sync transaction record and broadcast it
// broadcastSyncTransaction will broadcast transaction related to syncTx record
func broadcastSyncTransaction(ctx context.Context, syncTx *SyncTransaction) error {
// Successfully capture any panics, convert to readable string and log the error
defer recoverAndLog(ctx, syncTx.client.Logger())
@@ -142,7 +142,7 @@ func broadcastSyncTransaction(ctx context.Context, syncTx *SyncTransaction) erro
return err
}

// Get the transaction transaction HEX
// Get the transaction HEX
var txHex string
if syncTx.transaction != nil && syncTx.transaction.Hex != "" {
// the transaction has already been retrieved and added to the syncTx object, just use that

0 comments on commit c22938e

Please sign in to comment.