diff --git a/lib/node.js b/lib/node.js index e6580483..92dd8bf7 100644 --- a/lib/node.js +++ b/lib/node.js @@ -50,8 +50,6 @@ BitcoreNode.prototype.start = function() { BitcoreNode.prototype.sync = function() { var genesis = bitcore.Networks.defaultNetwork.genesis; - console.log(bitcore.Networks.defaultNetwork.name); - console.log(genesis); var self = this; this.nm.on('ready', function() { console.log('ready'); diff --git a/lib/services/block.js b/lib/services/block.js index 661c0159..7f5b4335 100644 --- a/lib/services/block.js +++ b/lib/services/block.js @@ -89,7 +89,7 @@ BlockService.prototype.unlock = function() { * @param {Number} blockData.time a 32 bit number with the timestamp when this block was created * @param {Number} blockData.nonce a 32 bit number with a random number * @param {string} blockData.bits a 32 bit "varint" encoded number with the length of the block - * @param {string} blockData.merkleRoot an hex string of length 64 with the hash of the block + * @param {string} blockData.merkleroot an hex string of length 64 with the hash of the block * @param {Array} transactions an array of bitcore.Transaction objects, in the order that forms the * merkle root hash * @return {bitcore.Block} @@ -113,6 +113,7 @@ BlockService.blockRPCtoBitcore = function(blockData) { new bitcore.deps.Buffer(blockData.merkleroot, 'hex') ) }), + transactions: blockData.transaction }); block.height = blockData.height; return block; @@ -212,11 +213,8 @@ BlockService.prototype.getLatest = function() { return self.getBlock(blockHash); - }).catch(function(err) { - if (err instanceof LevelUp.errors.NotFoundError) { - return null; - } - throw err; + }).catch(LevelUp.errors.NotFoundError, function() { + return null; }); };