Skip to content

Commit b5a5257

Browse files
committed
[Refactor] Remove unused setStakeSeen variable
1 parent ec7993e commit b5a5257

File tree

3 files changed

+0
-13
lines changed

3 files changed

+0
-13
lines changed

src/main.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ CCriticalSection cs_main;
6363

6464
BlockMap mapBlockIndex;
6565
map<uint256, uint256> mapProofOfStake;
66-
set<pair<COutPoint, unsigned int> > setStakeSeen;
6766
map<unsigned int, unsigned int> mapHashedBlocks;
6867
CChain chainActive;
6968
CBlockIndex* pindexBestHeader = NULL;
@@ -3985,10 +3984,6 @@ CBlockIndex* AddToBlockIndex(const CBlock& block)
39853984
pindexNew->nSequenceId = 0;
39863985
BlockMap::iterator mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first;
39873986

3988-
//mark as PoS seen
3989-
if (pindexNew->IsProofOfStake())
3990-
setStakeSeen.insert(make_pair(pindexNew->prevoutStake, pindexNew->nStakeTime));
3991-
39923987
pindexNew->phashBlock = &((*mi).first);
39933988
BlockMap::iterator miPrev = mapBlockIndex.find(block.hashPrevBlock);
39943989
if (miPrev != mapBlockIndex.end()) {
@@ -5102,10 +5097,6 @@ CBlockIndex* InsertBlockIndex(uint256 hash)
51025097
throw runtime_error("LoadBlockIndex() : new CBlockIndex failed");
51035098
mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first;
51045099

5105-
//mark as PoS seen
5106-
if (pindexNew->IsProofOfStake())
5107-
setStakeSeen.insert(make_pair(pindexNew->prevoutStake, pindexNew->nStakeTime));
5108-
51095100
pindexNew->phashBlock = &((*mi).first);
51105101

51115102
return pindexNew;

src/main.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ extern int64_t nReserveBalance;
171171

172172
extern std::map<uint256, int64_t> mapRejectedBlocks;
173173
extern std::map<unsigned int, unsigned int> mapHashedBlocks;
174-
extern std::set<std::pair<COutPoint, unsigned int> > setStakeSeen;
175174
extern std::map<uint256, int64_t> mapZerocoinspends; //txid, time received
176175

177176
/** Best header we've seen so far (used for getheaders queries' starting points). */

src/txdb.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,6 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
265265
if (!CheckProofOfWork(pindexNew->GetBlockHash(), pindexNew->nBits))
266266
return error("LoadBlockIndex() : CheckProofOfWork failed: %s", pindexNew->ToString());
267267
}
268-
// ppcoin: build setStakeSeen
269-
if (pindexNew->IsProofOfStake())
270-
setStakeSeen.insert(make_pair(pindexNew->prevoutStake, pindexNew->nStakeTime));
271268

272269
//populate accumulator checksum map in memory
273270
if(pindexNew->nAccumulatorCheckpoint != 0 && pindexNew->nAccumulatorCheckpoint != nPreviousCheckpoint) {

0 commit comments

Comments
 (0)