Setup RPC query rates

This commit is contained in:
Prathamesh Musale 2023-10-12 13:45:45 +05:30
parent cb2c23da8a
commit d26e2d5423

View File

@ -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