From e7c542146ead54ee143d0c17269270a28d537daf Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Mon, 28 Nov 2016 08:50:01 +0800 Subject: [PATCH] fix: show correct block size --- src/page.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/page.h b/src/page.h index 191b014..ac43da7 100644 --- a/src/page.h +++ b/src/page.h @@ -783,7 +783,7 @@ public: } // get block size in bytes - uint64_t blk_size = get_object_blobsize(blk); + uint64_t blk_size = core_storage->get_db().get_block_size(_blk_height); // miner reward tx transaction coinbase_tx = blk.miner_tx; @@ -791,7 +791,6 @@ public: // transcation in the block vector tx_hashes = blk.tx_hashes; - bool have_txs = !blk.tx_hashes.empty(); // sum of all transactions in the block @@ -3473,8 +3472,13 @@ private: get_payment_id(tx, txd.payment_id, txd.payment_id8); + + //blobdata tx_blob = t_serializable_object_to_blob(tx); + // get tx size in bytes txd.size = get_object_blobsize(tx); + //txd.size = tx_blob.size(); + //txd.size = core_storage->get_db().get_block_size(); txd.input_key_imgs = get_key_images(tx); txd.output_pub_keys = get_ouputs(tx);