|
|
@ -11,6 +11,7 @@ const async = require('async') |
|
|
|
const EthQuery = require('eth-query') |
|
|
|
const EthQuery = require('eth-query') |
|
|
|
const ObservableStore = require('obs-store') |
|
|
|
const ObservableStore = require('obs-store') |
|
|
|
const EventEmitter = require('events').EventEmitter |
|
|
|
const EventEmitter = require('events').EventEmitter |
|
|
|
|
|
|
|
const ethUtil = require('ethereumjs-util') |
|
|
|
function noop () {} |
|
|
|
function noop () {} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -59,8 +60,9 @@ class AccountTracker extends EventEmitter { |
|
|
|
_updateForBlock (block) { |
|
|
|
_updateForBlock (block) { |
|
|
|
const blockNumber = '0x' + block.number.toString('hex') |
|
|
|
const blockNumber = '0x' + block.number.toString('hex') |
|
|
|
this._currentBlockNumber = blockNumber |
|
|
|
this._currentBlockNumber = blockNumber |
|
|
|
|
|
|
|
const currentBlockGasLimit = ethUtil.addHexPrefix(block.gasLimit.toString()) |
|
|
|
|
|
|
|
|
|
|
|
this.store.updateState({ currentBlockGasLimit: `0x${block.gasLimit.toString('hex')}` }) |
|
|
|
this.store.updateState({ currentBlockGasLimit }) |
|
|
|
|
|
|
|
|
|
|
|
async.parallel([ |
|
|
|
async.parallel([ |
|
|
|
this._updateAccounts.bind(this), |
|
|
|
this._updateAccounts.bind(this), |
|
|
|