commit
9616602a23
23
lib/node.js
23
lib/node.js
@ -119,7 +119,7 @@ Node.prototype.isActive = function()
|
|||||||
this.stats.errors = [];
|
this.stats.errors = [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var peers = web3.net.peerCount;
|
var peers = web3.toDecimal(web3.net.peerCount);
|
||||||
|
|
||||||
if(peers !== null)
|
if(peers !== null)
|
||||||
{
|
{
|
||||||
@ -338,13 +338,13 @@ Node.prototype.setWatches = function()
|
|||||||
{
|
{
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
this.pendingWatch = web3.eth.filter('pending');
|
// this.pendingWatch = web3.eth.filter('pending');
|
||||||
this.pendingWatch.watch( function(log) {
|
// this.pendingWatch.watch( function(log) {
|
||||||
console.log(log);
|
// console.log(log);
|
||||||
// console.log(self.pendingWatch.get());
|
// // console.log(self.pendingWatch.get());
|
||||||
// console.log('pending changed');
|
// // console.log('pending changed');
|
||||||
// self.stats.pending = parseInt(log.number);
|
// // self.stats.pending = parseInt(log.number);
|
||||||
});
|
// });
|
||||||
|
|
||||||
// this.chainWatch = web3.eth.watch('chain');
|
// this.chainWatch = web3.eth.watch('chain');
|
||||||
// this.chainWatch.messages(function(log) {
|
// this.chainWatch.messages(function(log) {
|
||||||
@ -380,13 +380,14 @@ Node.prototype.stop = function()
|
|||||||
if(this._socket)
|
if(this._socket)
|
||||||
socket.end();
|
socket.end();
|
||||||
|
|
||||||
web3.reset();
|
|
||||||
|
|
||||||
if(this.updateInterval)
|
if(this.updateInterval)
|
||||||
clearInterval(this.updateInterval);
|
clearInterval(this.updateInterval);
|
||||||
|
|
||||||
if(this.pendingWatch)
|
web3.reset();
|
||||||
this.pendingWatch.stopWatching();
|
|
||||||
|
// if(this.pendingWatch)
|
||||||
|
// this.pendingWatch.stopWatching();
|
||||||
|
|
||||||
// if(this.chainWatch)
|
// if(this.chainWatch)
|
||||||
// this.chainWatch.uninstall();
|
// this.chainWatch.uninstall();
|
||||||
|
Loading…
Reference in New Issue
Block a user