Fixed bug: block_raw_str_hex out of scope

This commit is contained in:
Sai Raj 2023-01-07 17:10:50 +05:30 committed by GitHub
parent 97d7c6ecde
commit e98754eab8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,11 +193,11 @@ BlockService.prototype.getRawBlock = function(hash, callback) {
if(typeof block_raw_str_hex == "undefined" || block_raw_str_hex == ''){
return callback();
}
log.info("Testing getRawBlock " + block_raw_str_hex);
callback(null, block_raw_str_hex);
} catch(e){
return callback();
}
log.info("Testing getRawBlock " + block_raw_str_hex);
callback(null, block.toRaw().toString('hex'));
});
};