From 2a3d132b554e02ba1d3fc3b6413fb05ac18e5c28 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 15 Mar 2019 14:28:39 -0400 Subject: [PATCH] Show foundersreward in getblocktemplate if ac_founders enabled (#1334) --- src/rpc/mining.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 975154cdf..2efe8d694 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -49,6 +49,7 @@ using namespace std; #include "komodo_defs.h" +extern int32_t ASSETCHAINS_FOUNDERS; arith_uint256 komodo_PoWtarget(int32_t *percPoSp,arith_uint256 target,int32_t height,int32_t goalperc); @@ -785,10 +786,10 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) if (tx.IsCoinBase() && coinbasetxn == true ) { // Show founders' reward if it is required - //if (pblock->vtx[0].vout.size() > 1) { + if (ASSETCHAINS_FOUNDERS && pblock->vtx[0].vout.size() > 1) { // Correct this if GetBlockTemplate changes the order - // entry.push_back(Pair("foundersreward", (int64_t)tx.vout[1].nValue)); - //} + entry.push_back(Pair("foundersreward", (int64_t)tx.vout[1].nValue)); + } CAmount nReward = GetBlockSubsidy(chainActive.LastTip()->GetHeight()+1, Params().GetConsensus()); entry.push_back(Pair("coinbasevalue", nReward)); entry.push_back(Pair("required", true));