account-tracker - guard against empty block

This commit is contained in:
kumavis 2018-05-24 13:43:36 -07:00
parent 49ef93b991
commit 91accee2c6
1 changed files with 2 additions and 1 deletions

View File

@ -130,8 +130,9 @@ class AccountTracker {
async _updateForBlock (blockNumber) {
this._currentBlockNumber = blockNumber
// this shouldn't be here...
// block gasLimit polling shouldn't be in account-tracker shouldn't be here...
const currentBlock = await this._query.getBlockByNumber(blockNumber, false)
if (!currentBlock) return
const currentBlockGasLimit = currentBlock.gasLimit
this.store.updateState({ currentBlockGasLimit })