Skip to content

Commit

Permalink
remove unused already_touched variants
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRubin committed Oct 28, 2019
1 parent 8e193c6 commit 2fb5de2
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/txmempool.h
Expand Up @@ -763,21 +763,13 @@ class CTxMemPool
};
EpochGuard GetFreshEpoch() const EXCLUSIVE_LOCKS_REQUIRED(cs);

bool already_touched(txiter it, uint64_t during) const EXCLUSIVE_LOCKS_REQUIRED(cs) {
assert(has_epoch_guard);
bool ret = it->m_epoch >= during;
it->m_epoch = std::max(it->m_epoch, during);
return ret;
}
bool already_touched(boost::optional<txiter> it, uint64_t during) const EXCLUSIVE_LOCKS_REQUIRED(cs) {
return !it || already_touched(*it, during);
}
bool already_touched(txiter it) const EXCLUSIVE_LOCKS_REQUIRED(cs) {
assert(has_epoch_guard);
bool ret = it->m_epoch >= m_epoch;
it->m_epoch = std::max(it->m_epoch, m_epoch);
return ret;
}

bool already_touched(boost::optional<txiter> it) const EXCLUSIVE_LOCKS_REQUIRED(cs) {
return !it || already_touched(*it);
}
Expand Down

0 comments on commit 2fb5de2

Please sign in to comment.