From 01b8630146ac60cbbcd259cf39d5517e280b614f Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Thu, 12 May 2016 07:29:54 +0000 Subject: [PATCH] do not calculate tx fees for miner blocks --- src/page.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/page.h b/src/page.h index 39b12b5..6091479 100644 --- a/src/page.h +++ b/src/page.h @@ -1952,10 +1952,18 @@ namespace xmreg { // get mixin number txd.mixin_no = get_mixin_no(tx); + txd.fee = 0; + if (!coinbase && tx.vin.size() > 0) { - // get tx fee - txd.fee = get_tx_fee(tx); + // check if not miner tx + // i.e., for blocks without any user transactions + if (tx.vin.at(0).type() != typeid(txin_gen)) + { + // get tx fee + txd.fee = get_tx_fee(tx); + } + } get_payment_id(tx, txd.payment_id, txd.payment_id8);