Refactor consensus:

Classes implementing the consensus process on Ripple are cleaned
up in preparation for modularizations and compartmentalization.

Functions and state related to inter-round consensus are moved out
of NetworkOPs and into Consensus, where they are more effectively
isolated.

Some member functions are changed to free functions and some free
functions have their scope reduced to specific translation units.

* Track inter-round consensus state using new Consensus object
* Devirtualize interfaces
* Reduce NetworkOPs, Consensus and LedgerConsensus interfaces
* Add comments
This commit is contained in:
Nik Bougalis
2015-05-31 13:23:33 -07:00
parent 9111ad1a9d
commit 1a843fb4f6
20 changed files with 2748 additions and 2507 deletions

View File

@@ -397,13 +397,6 @@ public:
mBuildingLedgerSeq.store (i);
}
bool haveLedgerRange (std::uint32_t from, std::uint32_t to)
{
ScopedLockType sl (mCompleteLock);
std::uint32_t prevMissing = mCompleteLedgers.prevMissing (to + 1);
return (prevMissing == RangeSet::absent) || (prevMissing < from);
}
bool haveLedger (std::uint32_t seq)
{
ScopedLockType sl (mCompleteLock);