fix serve command for ipld graphql server

This commit is contained in:
ramil
2021-04-16 16:56:02 +03:00
parent 75debec01a
commit 31cbaec567
2 changed files with 13 additions and 8 deletions
+4 -1
View File
@@ -79,6 +79,7 @@ type Config struct {
ChainConfig *params.ChainConfig
DefaultSender *common.Address
RPCGasCap *big.Int
EthHttpEndpoint string
Client *rpc.Client
SupportStateDiff bool
}
@@ -97,12 +98,14 @@ func NewConfig() (*Config, error) {
c.DBConfig.Init()
ethHTTP := viper.GetString("ethereum.httpPath")
nodeInfo, cli, err := shared.GetEthNodeAndClient(fmt.Sprintf("http://%s", ethHTTP))
ethHTTPEndpoint := fmt.Sprintf("http://%s", ethHTTP)
nodeInfo, cli, err := shared.GetEthNodeAndClient(ethHTTPEndpoint)
if err != nil {
return nil, err
}
c.Client = cli
c.SupportStateDiff = viper.GetBool("ethereum.supportsStateDiff")
c.EthHttpEndpoint = ethHTTPEndpoint
// websocket server
wsEnabled := viper.GetBool("eth.server.ws")