Skip to content

Commit

Permalink
Small changes - 3
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya1702 committed Sep 13, 2023
1 parent b8bbcc6 commit 43e3c17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion services/horizon/internal/txsub/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func txResultFromHistory(tx history.Transaction) (history.Transaction, error) {
// queries execute on different ledgers. In this case, txsub can mistakenly respond with a bad_seq error
// because the first query occurs when the tx is not yet ingested and the second query occurs when the tx
// is ingested.
func checkTxAlreadyExists(ctx context.Context, db HorizonDB, hash, sourceAddress string) (history.Transaction, error) {
func checkTxAlreadyExists(ctx context.Context, db HorizonDB, hash string) (history.Transaction, error) {
err := db.BeginTx(ctx, &sql.TxOptions{
Isolation: sql.LevelRepeatableRead,
ReadOnly: true,
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/txsub/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (sys *System) Submit(
return
}

tx, err := checkTxAlreadyExists(ctx, db, hash, sourceAddress)
tx, err := checkTxAlreadyExists(ctx, db, hash)
if err == nil {
sys.Log.Ctx(ctx).WithField("hash", hash).Info("Found submission result in a DB")
sys.finish(ctx, hash, resultCh, Result{Transaction: tx})
Expand Down

0 comments on commit 43e3c17

Please sign in to comment.