From e98754eab82241fa330b4a9f0b05377888420eec Mon Sep 17 00:00:00 2001 From: Sai Raj <39055732+sairajzero@users.noreply.github.com> Date: Sat, 7 Jan 2023 17:10:50 +0530 Subject: [PATCH] Fixed bug: block_raw_str_hex out of scope --- lib/services/block/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/services/block/index.js b/lib/services/block/index.js index c16678db..8f8077a8 100644 --- a/lib/services/block/index.js +++ b/lib/services/block/index.js @@ -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')); }); };