@@ -105,6 +105,7 @@ UniValue rpc_getblockstats(const UniValue& params, bool fHelp)
105105 int64_t researchtotal = 0 ;
106106 int64_t interesttotal = 0 ;
107107 int64_t minttotal = 0 ;
108+ int64_t feetotal = 0 ;
108109 int64_t poscount = 0 ;
109110 int64_t emptyblockscount = 0 ;
110111 int64_t l_first = std::numeric_limits<int >::max ();
@@ -183,6 +184,7 @@ UniValue rpc_getblockstats(const UniValue& params, bool fHelp)
183184 interesttotal += claim.m_block_subsidy ;
184185 researchcount += claim.HasResearchReward ();
185186 minttotal += mint;
187+ feetotal += fees;
186188 unsigned sizeblock = GetSerializeSize (block, SER_NETWORK, PROTOCOL_VERSION);
187189 size_min_blk = std::min (size_min_blk,sizeblock);
188190 size_max_blk = std::max (size_max_blk,sizeblock);
@@ -245,6 +247,8 @@ UniValue rpc_getblockstats(const UniValue& params, bool fHelp)
245247 result.pushKV (" research" , ValueFromAmount (researchtotal));
246248 result.pushKV (" interest" , ValueFromAmount (interesttotal));
247249 result.pushKV (" mint" , ValueFromAmount (minttotal));
250+ result.pushKV (" fees" , ValueFromAmount (feetotal));
251+ // result.pushKV("stake_input", stakeinputtotal/(double)COIN);
248252 result.pushKV (" blocksizek" , size_sum_blk / (double ) 1024 );
249253 result.pushKV (" posdiff" , diff_sum);
250254 result1.pushKV (" totals" , result);
@@ -260,6 +264,7 @@ UniValue rpc_getblockstats(const UniValue& params, bool fHelp)
260264 result.pushKV (" research" , ValueFromAmount (research_average));
261265 result.pushKV (" interest" , ValueFromAmount (interesttotal / blockcount));
262266 result.pushKV (" mint" , ValueFromAmount (minttotal / blockcount));
267+ result.pushKV (" fees" , ValueFromAmount (feetotal / blockcount));
263268
264269 double spacing_sec = (l_last_time - l_first_time) / (double ) (blockcount - 1 );
265270 result.pushKV (" spacing_sec" , spacing_sec);
0 commit comments