Skip to content

Commit

Permalink
need to select FOR UPDATE to lock row (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaytonNorthey92 authored Sep 5, 2024
1 parent daa09d9 commit dcd150d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions database/bfgd/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,7 @@ func (p *pgdb) BtcTransactionBroadcastRequestGetNext(ctx context.Context, onlyNe
AND broadcast_at IS NULL
AND created_at > NOW() - INTERVAL '30 minutes'
%s
FOR UPDATE
LIMIT 1
)
RETURNING serialized_tx
Expand Down

0 comments on commit dcd150d

Please sign in to comment.