From 76d0663369e1ead2c3113a2a3cbfa8052c5feb86 Mon Sep 17 00:00:00 2001 From: lateminer Date: Tue, 30 Oct 2018 00:31:21 +0300 Subject: [PATCH] vTxSigOps -> vTxSigOpsCost --- src/miner.cpp | 6 +++--- src/miner.h | 2 +- src/rpc/mining.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index ac23b0a6e..887c49a6a 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -131,7 +131,7 @@ CBlockTemplate* BlockAssembler::CreateNewBlock(const CScript& scriptPubKeyIn, in // Add dummy coinbase tx as first transaction pblock->vtx.push_back(CTransaction()); pblocktemplate->vTxFees.push_back(-1); // updated at end - pblocktemplate->vTxSigOps.push_back(-1); // updated at end + pblocktemplate->vTxSigOpsCost.push_back(-1); // updated at end LOCK2(cs_main, mempool.cs); CBlockIndex* pindexPrev = chainActive.Tip(); @@ -185,7 +185,7 @@ CBlockTemplate* BlockAssembler::CreateNewBlock(const CScript& scriptPubKeyIn, in UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev); pblock->nBits = GetNextTargetRequired(pindexPrev, pblock, chainparams.GetConsensus(), fProofOfStake); pblock->nNonce = 0; - pblocktemplate->vTxSigOps[0] = GetLegacySigOpCount(pblock->vtx[0]); + pblocktemplate->vTxSigOpsCost[0] = GetLegacySigOpCount(pblock->vtx[0]); CValidationState state; if (!fProofOfStake && !TestBlockValidity(state, chainparams, *pblock, pindexPrev, false, false, true)) { @@ -289,7 +289,7 @@ void BlockAssembler::AddToBlock(CTxMemPool::txiter iter) { pblock->vtx.push_back(iter->GetTx()); pblocktemplate->vTxFees.push_back(iter->GetFee()); - pblocktemplate->vTxSigOps.push_back(iter->GetSigOpCost()); + pblocktemplate->vTxSigOpsCost.push_back(iter->GetSigOpCost()); nBlockSize += iter->GetTxSize(); ++nBlockTx; nBlockSigOpsCost += iter->GetSigOpCost(); diff --git a/src/miner.h b/src/miner.h index f69e60d09..a59092bad 100644 --- a/src/miner.h +++ b/src/miner.h @@ -29,7 +29,7 @@ struct CBlockTemplate { CBlock block; std::vector vTxFees; - std::vector vTxSigOps; + std::vector vTxSigOpsCost; }; // Container for tracking updates to ancestor feerate as we include (parent) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index ae72d615d..9d925acd9 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -621,7 +621,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) int index_in_template = i - 1; entry.push_back(Pair("fee", pblocktemplate->vTxFees[index_in_template])); - entry.push_back(Pair("sigops", pblocktemplate->vTxSigOps[index_in_template])); + entry.push_back(Pair("sigops", pblocktemplate->vTxSigOpsCost[index_in_template])); transactions.push_back(entry); }