From 89aa746ca12e36f28dc5f2b693f3e5d3d01c8842 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 23 Sep 2016 00:16:13 +1200 Subject: [PATCH] GBT: Add informational founders' reward value to coinbasetxn --- src/rpcmining.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 8d6408f56..acdf366a1 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -594,6 +594,11 @@ Value getblocktemplate(const Array& params, bool fHelp) entry.push_back(Pair("sigops", pblocktemplate->vTxSigOps[index_in_template])); if (tx.IsCoinBase()) { + // Show founders' reward if it is required + if (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("required", true)); txCoinbase = entry; } else {