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 Dec 10 '14 at 19:41
  • Here is the module github.com/bitpay/bitcore – Davit Huroyan Dec 11 '14 at 6:18
  • 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 Dec 12 '14 at 15:04
  • I stoped to use this library now I use Insight API github.com/bitpay/insight-api – Davit Huroyan Jan 9 '15 at 23:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.