Skip to content

Commit

Permalink
add txn_participation.round filter (#1578)
Browse files Browse the repository at this point in the history
  • Loading branch information
urtho authored Oct 19, 2023
1 parent 2517879 commit 6ef871c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions idb/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,16 @@ func buildTransactionQuery(tf idb.TransactionFilter) (query string, whereArgs []
whereParts = append(whereParts, fmt.Sprintf("p.addr = $%d", partNumber))
whereArgs = append(whereArgs, tf.Address)
partNumber++
if tf.MinRound != 0 {
whereParts = append(whereParts, fmt.Sprintf("p.round >= $%d", partNumber))
whereArgs = append(whereArgs, tf.MinRound)
partNumber++
}
if tf.MaxRound != 0 {
whereParts = append(whereParts, fmt.Sprintf("p.round <= $%d", partNumber))
whereArgs = append(whereArgs, tf.MaxRound)
partNumber++
}
if tf.AddressRole != 0 {
addrBase64 := encoding.Base64(tf.Address)
roleparts := make([]string, 0, 8)
Expand Down

0 comments on commit 6ef871c

Please sign in to comment.