block: avoid error by ensuring hashes and flags for non-merkleblocks.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
This commit is contained in:
parent
296f95b27b
commit
3998146046
@ -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 = [];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user