Skip to content

Commit

Permalink
[Refactor] Remove unused setStakeSeen variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Warrows committed May 8, 2019
1 parent ec7993e commit b5a5257
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
9 changes: 0 additions & 9 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ CCriticalSection cs_main;

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

//mark as PoS seen
if (pindexNew->IsProofOfStake())
setStakeSeen.insert(make_pair(pindexNew->prevoutStake, pindexNew->nStakeTime));

pindexNew->phashBlock = &((*mi).first);
BlockMap::iterator miPrev = mapBlockIndex.find(block.hashPrevBlock);
if (miPrev != mapBlockIndex.end()) {
Expand Down Expand Up @@ -5102,10 +5097,6 @@ CBlockIndex* InsertBlockIndex(uint256 hash)
throw runtime_error("LoadBlockIndex() : new CBlockIndex failed");
mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first;

//mark as PoS seen
if (pindexNew->IsProofOfStake())
setStakeSeen.insert(make_pair(pindexNew->prevoutStake, pindexNew->nStakeTime));

pindexNew->phashBlock = &((*mi).first);

return pindexNew;
Expand Down
1 change: 0 additions & 1 deletion src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ extern int64_t nReserveBalance;

extern std::map<uint256, int64_t> mapRejectedBlocks;
extern std::map<unsigned int, unsigned int> mapHashedBlocks;
extern std::set<std::pair<COutPoint, unsigned int> > setStakeSeen;
extern std::map<uint256, int64_t> mapZerocoinspends; //txid, time received

/** Best header we've seen so far (used for getheaders queries' starting points). */
Expand Down
3 changes: 0 additions & 3 deletions src/txdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,6 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
if (!CheckProofOfWork(pindexNew->GetBlockHash(), pindexNew->nBits))
return error("LoadBlockIndex() : CheckProofOfWork failed: %s", pindexNew->ToString());
}
// ppcoin: build setStakeSeen
if (pindexNew->IsProofOfStake())
setStakeSeen.insert(make_pair(pindexNew->prevoutStake, pindexNew->nStakeTime));

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

0 comments on commit b5a5257

Please sign in to comment.