Added response to invites to receive transactions in the example.

This commit is contained in:
Timon Rapp 2014-02-20 14:57:38 +01:00
parent 9b04009078
commit 3152f72460
1 changed files with 7 additions and 4 deletions

View File

@ -15,12 +15,15 @@ var handleBlock = function(b) {
console.log('block received:', util.inspect(b.message,{depth:null}));
};
var handleTx = function(b) {
console.log('block tx:', util.inspect(b.message,{depth:null}));
var handleTx = function(info) {
var tx = info.message.tx.getStandardizedObject();
console.log('block tx:', util.inspect(tx,{depth:null}));
};
var handleInv = function(b) {
console.log('block inv:', util.inspect(b.message,{depth:null}));
var handleInv = function(info) {
console.log('block inv:', util.inspect(info.message,{depth:null}));
var invs = info.message.invs;
info.conn.sendGetData(invs);
};