Skip to content

Commit

Permalink
payload check with min slot
Browse files Browse the repository at this point in the history
  • Loading branch information
metachris committed Jul 26, 2024
1 parent 0c2c1d9 commit 566f02a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/core/check-payload-value.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
var (
limit uint64
slotMax uint64
slotMin uint64
ethNodeURI string
ethNodeBackupURI string
checkIncorrectOnly bool
Expand All @@ -31,7 +32,8 @@ var (

func init() {
checkPayloadValueCmd.Flags().Uint64Var(&slot, "slot", 0, "a specific slot")
checkPayloadValueCmd.Flags().Uint64Var(&slotMax, "slot-max", 0, "a specific max slot, only check slots below this")
checkPayloadValueCmd.Flags().Uint64Var(&slotMax, "slot-max", 0, "a specific max slot, only check slots before")
checkPayloadValueCmd.Flags().Uint64Var(&slotMin, "slot-min", 0, "only check slots after")
checkPayloadValueCmd.Flags().Uint64Var(&limit, "limit", 1000, "how many payloads")
checkPayloadValueCmd.Flags().Uint64Var(&numThreads, "threads", 10, "how many threads")
checkPayloadValueCmd.Flags().StringVar(&ethNodeURI, "eth-node", vars.DefaultEthNodeURI, "eth node URI (i.e. Infura)")
Expand Down Expand Up @@ -88,6 +90,9 @@ var checkPayloadValueCmd = &cobra.Command{
if slotMax > 0 {
query += fmt.Sprintf(" WHERE slot<=%d", slotMax)
}
if slotMin > 0 {
query += fmt.Sprintf(" WHERE slot>=%d", slotMin)
}
query += ` ORDER BY slot DESC`
if limit > 0 {
query += fmt.Sprintf(" limit %d", limit)
Expand Down

0 comments on commit 566f02a

Please sign in to comment.