review fixes
This commit is contained in:
+2
-2
@@ -181,11 +181,11 @@ func getClients() (client.RPCClient, *ethclient.Client) {
|
||||
func getWSClient() core.RPCClient {
|
||||
wsRPCpath := viper.GetString("client.wsPath")
|
||||
if wsRPCpath == "" {
|
||||
LogWithCommand.Fatal(errors.New("getWSClient() was called but no ws rpc path is provided"))
|
||||
logWithCommand.Fatal(errors.New("getWSClient() was called but no ws rpc path is provided"))
|
||||
}
|
||||
wsRPCClient, dialErr := rpc.Dial(wsRPCpath)
|
||||
if dialErr != nil {
|
||||
LogWithCommand.Fatal(dialErr)
|
||||
logWithCommand.Fatal(dialErr)
|
||||
}
|
||||
return client.NewRPCClient(wsRPCClient, wsRPCpath)
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ func configureSubscription() {
|
||||
}
|
||||
}
|
||||
|
||||
func getRPCClient() core.RpcClient {
|
||||
func getRPCClient() core.RPCClient {
|
||||
vulcPath := viper.GetString("subscription.path")
|
||||
if vulcPath == "" {
|
||||
vulcPath = "ws://127.0.0.1:8080" // default to and try the default ws url if no path is provided
|
||||
@@ -225,5 +225,5 @@ func getRPCClient() core.RpcClient {
|
||||
if err != nil {
|
||||
logWithCommand.Fatal(err)
|
||||
}
|
||||
return client.NewRpcClient(rawRPCClient, vulcPath)
|
||||
return client.NewRPCClient(rawRPCClient, vulcPath)
|
||||
}
|
||||
|
||||
@@ -77,16 +77,16 @@ func syncAndPublish() {
|
||||
wg.Wait() // If an error was thrown, wg.Add was never called and this will fall through
|
||||
}
|
||||
|
||||
func getBlockChainAndClient(path string) (*eth.BlockChain, core.RpcClient) {
|
||||
func getBlockChainAndClient(path string) (*eth.BlockChain, core.RPCClient) {
|
||||
rawRPCClient, dialErr := rpc.Dial(path)
|
||||
if dialErr != nil {
|
||||
logWithCommand.Fatal(dialErr)
|
||||
}
|
||||
rpcClient := client.NewRpcClient(rawRPCClient, ipc)
|
||||
rpcClient := client.NewRPCClient(rawRPCClient, ipc)
|
||||
ethClient := ethclient.NewClient(rawRPCClient)
|
||||
vdbEthClient := client.NewEthClient(ethClient)
|
||||
vdbNode := node.MakeNode(rpcClient)
|
||||
transactionConverter := vRpc.NewRpcTransactionConverter(ethClient)
|
||||
transactionConverter := vRpc.NewRPCTransactionConverter(ethClient)
|
||||
blockChain := eth.NewBlockChain(vdbEthClient, rpcClient, vdbNode, transactionConverter)
|
||||
return blockChain, rpcClient
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user