[VDB-751 VDB-754] Bugfix null pointer panic and improve logging (#119)

* VDB-751 VDB-754 Bugfix null pointer panic and improve logging

* Fix typo
This commit is contained in:
Edvard Hübinette
2019-07-18 09:21:40 +02:00
committed by GitHub
parent af6190ea09
commit 2c092e8d04
7 changed files with 166 additions and 25 deletions
+6 -2
View File
@@ -67,7 +67,11 @@ func Execute() {
func initFuncs(cmd *cobra.Command, args []string) {
database(cmd, args)
logLevel(cmd, args)
logLvlErr := logLevel(cmd, args)
if logLvlErr != nil {
log.Fatal("Could not set log level: ", logLvlErr)
}
}
@@ -147,7 +151,7 @@ func getBlockChain() *geth.BlockChain {
rawRpcClient, err := rpc.Dial(ipc)
if err != nil {
log.Fatal(err)
log.Fatal("Could not dial client: ", err)
}
rpcClient := client.NewRpcClient(rawRpcClient, ipc)
ethClient := ethclient.NewClient(rawRpcClient)