Merge pull request #3506 from ethcore/jg-block-gasLimit

Keep track of block gasLimit
This commit is contained in:
Nicolas Gotchac 2016-11-18 14:21:13 +01:00 committed by GitHub
commit aa43990456
2 changed files with 10 additions and 0 deletions

View File

@ -48,6 +48,15 @@ export default class Status {
}
this._store.dispatch(statusBlockNumber(blockNumber));
this._api.eth
.getBlockByNumber(blockNumber)
.then((block) => {
this._store.dispatch(statusCollection({ gasLimit: block.gasLimit }));
})
.catch((error) => {
console.warn('status._subscribeBlockNumber', 'getBlockByNumber', error);
});
})
.then((subscriptionId) => {
console.log('status._subscribeBlockNumber', 'subscriptionId', subscriptionId);

View File

@ -28,6 +28,7 @@ const initialState = {
enode: '',
extraData: '',
gasFloorTarget: new BigNumber(0),
gasLimit: new BigNumber(0),
hashrate: new BigNumber(0),
minGasPrice: new BigNumber(0),
netChain: 'morden',