erigon-pulse/cmd/devnet/requests/mock_request.go
ledgerwatch a8ec9eb471
[devnet tool] Use logging instead of fmt.Printf (#7560)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-22 08:46:50 +01:00

18 lines
346 B
Go

package requests
import (
"fmt"
"github.com/ledgerwatch/log/v3"
)
func PingErigonRpc(reqId int, logger log.Logger) error {
reqGen := initialiseRequestGenerator(reqId, logger)
res := reqGen.PingErigonRpc()
if res.Err != nil {
return fmt.Errorf("failed to ping erigon rpc url: %v", res.Err)
}
logger.Info("SUCCESS => OK")
return nil
}