[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
+3
View File
@@ -129,6 +129,9 @@ func (blockChain *BlockChain) GetTransactions(transactionHashes []common.Hash) (
func (blockChain *BlockChain) LastBlock() (*big.Int, error) {
block, err := blockChain.ethClient.HeaderByNumber(context.Background(), nil)
if err != nil {
return big.NewInt(0), err
}
return block.Number, err
}