Hi,
we're using your bitcore-p2p module, to get INV messages.
Our p2p pool is getting INV messages fine, but after some time stops getting them without any error.
We have tried to save connection of our pool and bitcoin network using ping and pong messages, but it haven't take any effect.
Code example:
var pool = new Pool({
network: Networks.livenet,
maxSize: 150,
dnsSeed: false,
addrs: hosts
});
pool.connect();
pool.on('peerinv', function (peer, message) {
var Invs = message.inventory;
async.eachLimit(Invs, 20, function (inv, cb) {
var invHash = lib.util.buffer.bufferToHex(lib.util.buffer.reverse(inv.hash));
//console.log(invHash);
cb();
}, function (err) {
assert.equal(null, err);
})
peer.sendMessage(messages.Ping());
peer.on('ping', function (message) {
console.log(message.nonce);
peer._sendPong(message.nonce);
});
peer.on('ready', function() {
console.log("ready",pool.inspect());
peer.sendMessage(messages.GetAddresses());
});
peer.on('addr', function(message) {
message.addresses.forEach(function(addr) {
console.log(addr);
pool._connectPeer(addr);
console.log(pool.inspect());
});
});
})
Hi, we're using your bitcore-p2p module, to get INV messages.
Our p2p pool is getting INV messages fine, but after some time stops getting them without any error. We have tried to save connection of our pool and bitcoin network using ping and pong messages, but it haven't take any effect.
Code example: