Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #3506 from ethcore/jg-block-gasLimit
Browse files Browse the repository at this point in the history
Keep track of block gasLimit
  • Loading branch information
ngotchac authored Nov 18, 2016
2 parents 3f2ba96 + 2de38c9 commit aa43990
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions js/src/redux/providers/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions js/src/redux/providers/statusReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit aa43990

Please sign in to comment.