hotfix for crash
This commit is contained in:
parent
b4df8314a2
commit
10db01654e
@ -181,10 +181,12 @@ BlockService.prototype.getRawBlock = function(hash, callback) {
|
||||
if(err) {
|
||||
return callback(err);
|
||||
}
|
||||
if (!block) {
|
||||
let block_raw = block.toRaw();
|
||||
let block_raw_str_hex = block_raw.toString('hex');
|
||||
if (!block || typeof block_raw == "undefined" || typeof block_raw_str_hex == "undefined" || block_raw_str_hex == '') {
|
||||
return callback();
|
||||
}
|
||||
log.info("Testing getRawBlock " + block.toRaw().toString('hex'));
|
||||
log.info("Testing getRawBlock " + block_raw_str_hex);
|
||||
callback(null, block.toRaw().toString('hex'));
|
||||
});
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user