3
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 **');
console.log(tx);
};
and it's printing transactions.
However, when I use this part:
var handleBlock = function(info) {
console.log('** Block Received **');
console.log(info.message);
};
It doesn't log anything to the console.
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 https://github.com/bitpay/bitcore
– Davit Huroyan – 2014-12-11T06:18:23.340I 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 https://github.com/bitpay/insight-api
– Davit Huroyan – 2015-01-09T23:06:25.083