diff --git a/src/page.h b/src/page.h index e03991e..4bd6130 100644 --- a/src/page.h +++ b/src/page.h @@ -151,6 +151,8 @@ namespace xmreg { return fmt::format("{:d} - {:d}", mixin_min, mixin_max); }; + uint64_t blk_size = get_object_blobsize(blk); + // set output page template map blocks.push_back(mstch::map { {"height" , to_string(i)}, @@ -164,10 +166,12 @@ namespace xmreg { XMR_AMOUNT(sum_xmr_in_out[0]))}, {"xmr_outputs" , fmt::format("{:0.2f}", XMR_AMOUNT(sum_xmr_in_out[1]))}, - {"mixin_range" , mstch::lambda {mixin_format}} + {"mixin_range" , mstch::lambda {mixin_format}}, + {"blksize" , fmt::format("{:0.2f}", + static_cast(blk_size) / 1024.0)} }); - prev_blk_timestamp = blk.timestamp; + prev_blk_timestamp = blk.timestamp; } // reverse blocks and remove last (i.e., oldest) @@ -259,7 +263,8 @@ namespace xmreg { {"fee" , fmt::format("{:0.4f}", XMR_AMOUNT(_tx_info.fee))}, {"xmr_inputs" , fmt::format("{:0.2f}", XMR_AMOUNT(sum_inputs))}, {"xmr_outputs" , fmt::format("{:0.2f}", XMR_AMOUNT(sum_outputs))}, - {"mixin" , fmt::format("{:d}", mixin_numbers.at(0))} + {"mixin" , fmt::format("{:d}", mixin_numbers.at(0))}, + {"txsize", fmt::format("{:0.2f}", static_cast(_tx_info.blob_size)/1024.0)} }); } diff --git a/src/templates/index.html b/src/templates/index.html index 0b7d95e..3606541 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -27,6 +27,7 @@ no_of_txs inputs/outputs mixin_range + size [kbytes] {{#blocks}} @@ -37,6 +38,7 @@ {{notx}} {{xmr_inputs}}/{{xmr_outputs}} {{mixin_range}} + {{blksize}} {{/blocks}} diff --git a/src/templates/mempool.html b/src/templates/mempool.html index 369ad6a..aa3c7ae 100644 --- a/src/templates/mempool.html +++ b/src/templates/mempool.html @@ -11,6 +11,7 @@ tx fee inputs/outputs mixin + size [kbytes] {{#mempooltxs}} @@ -20,6 +21,7 @@ {{fee}} {{xmr_inputs}}/{{xmr_outputs}} {{mixin}} + {{txsize}} {{/mempooltxs}}