diff --git a/src/miner.cpp b/src/miner.cpp index 9b6c3339b..98e161e4c 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -321,6 +321,9 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) // Masternode and general budget payments FillBlockPayee(txNew, nFees); + // Make payee + pblock->payee = txNew.vout[1].scriptPubKey; + nLastBlockTx = nBlockTx; nLastBlockSize = nBlockSize; LogPrintf("CreateNewBlock(): total size %u\n", nBlockSize); diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 34962ff31..2c8da34f7 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -610,7 +610,7 @@ Value getblocktemplate(const Array& params, bool fHelp) ExtractDestination(pblock->payee, address1); CBitcoinAddress address2(address1); result.push_back(Pair("payee", address2.ToString().c_str())); - result.push_back(Pair("payee_amount", (int64_t)GetMasternodePayment(pindexPrev->nHeight+1, pblock->vtx[0].GetValueOut()))); + result.push_back(Pair("payee_amount", (int64_t)pblock->vtx[0].vout[1].nValue)); } else { result.push_back(Pair("payee", "")); result.push_back(Pair("payee_amount", ""));