Skip to content

Commit 7893818

Browse files
committed
Removing not needed CBlock::payee member.
1 parent 3e07280 commit 7893818

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

src/miner.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,7 @@ bool CreateCoinbaseTx(CBlock* pblock, const CScript& scriptPubKeyIn, CBlockIndex
160160

161161
txNew.vin[0].scriptSig = CScript() << pindexPrev->nHeight + 1 << OP_0;
162162
//Make payee
163-
if (txNew.vout.size() > 1) {
164-
pblock->payee = txNew.vout[1].scriptPubKey;
165-
} else {
163+
if (txNew.vout.size() == 1) {
166164
CAmount blockValue = GetBlockValue(pindexPrev->nHeight);
167165
txNew.vout[0].nValue = blockValue;
168166
}

src/primitives/block.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ class CBlock : public CBlockHeader
8888
std::vector<unsigned char> vchBlockSig;
8989

9090
// memory only
91-
mutable CScript payee;
9291
mutable bool fChecked;
9392

9493
CBlock()
@@ -117,7 +116,6 @@ class CBlock : public CBlockHeader
117116
CBlockHeader::SetNull();
118117
vtx.clear();
119118
fChecked = false;
120-
payee = CScript();
121119
vchBlockSig.clear();
122120
}
123121

src/rpc/mining.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -624,18 +624,6 @@ UniValue getblocktemplate(const JSONRPCRequest& request)
624624
result.push_back(Pair("bits", strprintf("%08x", pblock->nBits)));
625625
result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight + 1)));
626626
result.push_back(Pair("votes", aVotes));
627-
628-
629-
if (pblock->payee != CScript()) {
630-
CTxDestination address1;
631-
ExtractDestination(pblock->payee, address1);
632-
result.push_back(Pair("payee", EncodeDestination(address1).c_str()));
633-
result.push_back(Pair("payee_amount", (int64_t)pblock->vtx[0].vout[1].nValue));
634-
} else {
635-
result.push_back(Pair("payee", ""));
636-
result.push_back(Pair("payee_amount", ""));
637-
}
638-
639627
result.push_back(Pair("enforce_masternode_payments", true));
640628

641629
return result;

0 commit comments

Comments
 (0)