From 566f02a0ba046dc5ea6aefa2697e1f23a666d027 Mon Sep 17 00:00:00 2001 From: Chris Hager Date: Fri, 26 Jul 2024 10:05:54 +0200 Subject: [PATCH] payload check with min slot --- cmd/core/check-payload-value.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/core/check-payload-value.go b/cmd/core/check-payload-value.go index c521dfb..c9705c3 100644 --- a/cmd/core/check-payload-value.go +++ b/cmd/core/check-payload-value.go @@ -21,6 +21,7 @@ import ( var ( limit uint64 slotMax uint64 + slotMin uint64 ethNodeURI string ethNodeBackupURI string checkIncorrectOnly bool @@ -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(ðNodeURI, "eth-node", vars.DefaultEthNodeURI, "eth node URI (i.e. Infura)") @@ -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)