From 2200ccaec4d91a41f509e7ff17d0c25a026fdc70 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 12 Oct 2023 13:45:45 +0530 Subject: [PATCH] Setup RPC query rates --- cmd/serve.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmd/serve.go b/cmd/serve.go index 15ac0325..8304d1a6 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -98,7 +98,14 @@ func serve() { pm.Start(wg) voucherValidator := paymentsmanager.InProcessValidator{PaymentsManager: pm} - queryRates := map[string]*big.Int{"eth_getBlockByNumber": big.NewInt(50)} + + // TODO: Configure + queryRates := map[string]*big.Int{ + "eth_getBlockByNumber": big.NewInt(50), + "eth_getBlockByHash": big.NewInt(50), + "eth_getStorageAt": big.NewInt(50), + "eth_getLogs": big.NewInt(50), + } if err := startServers(server, serverConfig, voucherValidator, queryRates); err != nil { logWithCommand.Fatal(err) @@ -120,9 +127,6 @@ func serve() { logWithCommand.Debug("state validator disabled") } - // paymentsManager, _ := payments.NewPaymentsManager(true) - // paymentsManager.Start(wg) - shutdown := make(chan os.Signal, 1) signal.Notify(shutdown, os.Interrupt) <-shutdown