Retrieve gasLimit on new blocks
This commit is contained in:
parent
b79d65c0f3
commit
5dcb3cbffb
@ -51,6 +51,15 @@ export default class Status {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._store.dispatch(statusBlockNumber(blockNumber));
|
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) => {
|
.then((subscriptionId) => {
|
||||||
console.log('status._subscribeBlockNumber', 'subscriptionId', subscriptionId);
|
console.log('status._subscribeBlockNumber', 'subscriptionId', subscriptionId);
|
||||||
|
@ -28,6 +28,7 @@ const initialState = {
|
|||||||
enode: '',
|
enode: '',
|
||||||
extraData: '',
|
extraData: '',
|
||||||
gasFloorTarget: new BigNumber(0),
|
gasFloorTarget: new BigNumber(0),
|
||||||
|
gasLimit: new BigNumber(0),
|
||||||
hashrate: new BigNumber(0),
|
hashrate: new BigNumber(0),
|
||||||
minGasPrice: new BigNumber(0),
|
minGasPrice: new BigNumber(0),
|
||||||
netChain: 'morden',
|
netChain: 'morden',
|
||||||
|
Loading…
Reference in New Issue
Block a user