|
59 | 59 | ShouldBroadcastBlockHashes bool |
60 | 60 | BroadcastWorkers int |
61 | 61 | TxBatchTimeout time.Duration |
| 62 | + TxBroadcastQueueSize int |
62 | 63 | ShouldRunPprof bool |
63 | 64 | PprofPort uint |
64 | 65 | ShouldRunPrometheus bool |
@@ -221,6 +222,7 @@ var SensorCmd = &cobra.Command{ |
221 | 222 | ShouldBroadcastBlockHashes: inputSensorParams.ShouldBroadcastBlockHashes, |
222 | 223 | BroadcastWorkers: inputSensorParams.BroadcastWorkers, |
223 | 224 | TxBatchTimeout: inputSensorParams.TxBatchTimeout, |
| 225 | + TxBroadcastQueueSize: inputSensorParams.TxBroadcastQueueSize, |
224 | 226 | }) |
225 | 227 |
|
226 | 228 | opts := p2p.EthProtocolOptions{ |
@@ -497,6 +499,7 @@ will result in less chance of missing data but can significantly increase memory |
497 | 499 | f.BoolVar(&inputSensorParams.ShouldBroadcastBlockHashes, "broadcast-block-hashes", false, "broadcast block hashes to peers") |
498 | 500 | f.IntVar(&inputSensorParams.BroadcastWorkers, "broadcast-workers", 4, "number of concurrent broadcast workers") |
499 | 501 | f.DurationVar(&inputSensorParams.TxBatchTimeout, "tx-batch-timeout", 500*time.Millisecond, "timeout for batching transactions before broadcast") |
| 502 | + f.IntVar(&inputSensorParams.TxBroadcastQueueSize, "tx-broadcast-queue-size", 100000, "capacity of transaction broadcast queue") |
500 | 503 | f.BoolVar(&inputSensorParams.ShouldRunPprof, "pprof", false, "run pprof server") |
501 | 504 | f.UintVar(&inputSensorParams.PprofPort, "pprof-port", 6060, "port pprof runs on") |
502 | 505 | f.BoolVar(&inputSensorParams.ShouldRunPrometheus, "prom", true, "run Prometheus server") |
|
0 commit comments