diff --git a/lib/bcoin/block.js b/lib/bcoin/block.js index d562ef34..081e934d 100644 --- a/lib/bcoin/block.js +++ b/lib/bcoin/block.js @@ -13,10 +13,10 @@ function Block(data) { this.bits = data.bits; this.nonce = data.nonce; this.totalTX = data.totalTX; - this.hashes = data.hashes.map(function(hash) { + this.hashes = (data.hashes || []).map(function(hash) { return utils.toHex(hash); }); - this.flags = data.flags; + this.flags = data.flags || []; // List of matched TXs this.tx = [];