Skip to content

Commit

Permalink
cleaned up transaction logic
Browse files Browse the repository at this point in the history
  • Loading branch information
dabasov committed Aug 3, 2023
1 parent a2ab909 commit 0bf2645
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/go/0chain.net/blobbercore/datastore/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (store *postgresStore) WithNewTransaction(f func(ctx context.Context) error

tx := store.GetTransaction(ctx)
err := f(ctx)
if err == nil {
if err != nil {
tx.Rollback()
return err
}
Expand Down

0 comments on commit 0bf2645

Please sign in to comment.