added workaround for eth until web3.js fix
This commit is contained in:
parent
593dbb4b0c
commit
200a581d2c
12
lib/node.js
12
lib/node.js
@ -504,6 +504,14 @@ Node.prototype.getPending = function()
|
|||||||
|
|
||||||
if (this._web3)
|
if (this._web3)
|
||||||
{
|
{
|
||||||
|
// TODO: Remove warkaround when web3.js is fixed
|
||||||
|
if( !this.chainFilter )
|
||||||
|
{
|
||||||
|
console.warn("Getting", chalk.reset.red('latest block'), chalk.reset.bold.red('forced'));
|
||||||
|
|
||||||
|
this.getLatestBlock();
|
||||||
|
}
|
||||||
|
|
||||||
console.info('==>', 'Getting Pending')
|
console.info('==>', 'Getting Pending')
|
||||||
|
|
||||||
web3.eth.getBlockTransactionCount('pending', function (err, pending)
|
web3.eth.getBlockTransactionCount('pending', function (err, pending)
|
||||||
@ -699,6 +707,8 @@ Node.prototype.setWatches = function()
|
|||||||
}
|
}
|
||||||
catch (err)
|
catch (err)
|
||||||
{
|
{
|
||||||
|
this.chainFilter = false;
|
||||||
|
|
||||||
console.error("Couldn't set up chain filter");
|
console.error("Couldn't set up chain filter");
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
@ -729,6 +739,8 @@ Node.prototype.setWatches = function()
|
|||||||
}
|
}
|
||||||
catch (err)
|
catch (err)
|
||||||
{
|
{
|
||||||
|
this.pendingFilter = false;
|
||||||
|
|
||||||
console.error("Couldn't set up pending filter");
|
console.error("Couldn't set up pending filter");
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user