Incoming block handler is never called when using bitcore


I want to get blocks on my node with bitcore.

For example, I'm using peermanager.js and I get transactions:

var handleTx = function(info) {
  var tx = info.message.tx.getStandardizedObject();
  console.log('** TX Received **');

and it's printing transactions.

However, when I use this part:

var handleBlock = function(info) {
  console.log('** Block Received **');

It doesn't log anything to the console.

Davit Huroyan

Posted 2014-12-10T08:19:22.817

Reputation: 131

Can you post the code that registers these as handlers with your PeerManager? – Nick ODell – 2014-12-10T19:41:18.880

Here is the module

– Davit Huroyan – 2014-12-11T06:18:23.340

I don't believe this is printing transactions. What you are getting is a list of transactions that another peer has available. Also without your code it's impossible to tell how you are using ´handleTx´ and ´handleBlock´ objects. – T9b – 2014-12-12T15:04:23.367

I stoped to use this library now I use Insight API

– Davit Huroyan – 2015-01-09T23:06:25.083

No answers