diff --git a/src/avalanche/processor.h b/src/avalanche/processor.h --- a/src/avalanche/processor.h +++ b/src/avalanche/processor.h @@ -105,7 +105,7 @@ /** * Blocks to run avalanche on. */ - RWCollection vote_records; + RWCollection blockVoteRecords; /** * Keep track of peers and queries sent. diff --git a/src/avalanche/processor.cpp b/src/avalanche/processor.cpp --- a/src/avalanche/processor.cpp +++ b/src/avalanche/processor.cpp @@ -256,13 +256,13 @@ isAccepted = ::ChainActive().Contains(pindex); } - return vote_records.getWriteView() + return blockVoteRecords.getWriteView() ->insert(std::make_pair(pindex, VoteRecord(isAccepted))) .second; } bool Processor::isAccepted(const CBlockIndex *pindex) const { - auto r = vote_records.getReadView(); + auto r = blockVoteRecords.getReadView(); auto it = r->find(pindex); if (it == r.end()) { return false; @@ -272,7 +272,7 @@ } int Processor::getConfidence(const CBlockIndex *pindex) const { - auto r = vote_records.getReadView(); + auto r = blockVoteRecords.getReadView(); auto it = r->find(pindex); if (it == r.end()) { return -1; @@ -387,7 +387,7 @@ { // Register votes. - auto w = vote_records.getWriteView(); + auto w = blockVoteRecords.getWriteView(); for (const auto &p : responseIndex) { CBlockIndex *pindex = p.first; const Vote &v = p.second; @@ -484,7 +484,7 @@ // First remove all blocks that are not worth polling. { LOCK(cs_main); - auto w = vote_records.getWriteView(); + auto w = blockVoteRecords.getWriteView(); for (auto it = w->begin(); it != w->end();) { const CBlockIndex *pindex = it->first; if (!IsWorthPolling(pindex)) { @@ -495,7 +495,7 @@ } } - auto r = vote_records.getReadView(); + auto r = blockVoteRecords.getReadView(); for (const std::pair &p : reverse_iterate(r)) { // Check if we can run poll. @@ -558,7 +558,7 @@ } } - auto w = vote_records.getWriteView(); + auto w = blockVoteRecords.getWriteView(); auto it = w->find(pindex); if (it == w.end()) { continue; diff --git a/src/avalanche/voterecord.h b/src/avalanche/voterecord.h --- a/src/avalanche/voterecord.h +++ b/src/avalanche/voterecord.h @@ -79,7 +79,7 @@ /** * Register that a request is being made regarding that item. * The method is made const so that it can be accessed via a read only view - * of vote_records. It's not a problem as it is made thread safe. + * of blockVoteRecords. It's not a problem as it is made thread safe. */ bool registerPoll() const;