Consensus refactor preliminary changes (RIPD-1011):

* Remove extraneous passing of transaction set hashes
* Remove recentPositions_. InboundTXs does the job now
* Move responsibility for sending "have TX set" out of consensus
This commit is contained in:
JoelKatz
2016-08-29 10:50:08 -07:00
committed by Edward Hennis
parent ed02b0717e
commit 97806b42c4
10 changed files with 74 additions and 101 deletions

View File

@@ -456,10 +456,11 @@ public:
( *this, stopwatch()
, *m_jobQueue
, m_collectorManager->collector ()
, [this](uint256 const& setHash,
std::shared_ptr <SHAMap> const& set)
, [this](std::shared_ptr <SHAMap> const& set,
bool fromAcquire)
{
gotTXSet (setHash, set);
if (set)
gotTXSet (set, fromAcquire);
}))
, m_acceptedLedgerCache ("AcceptedLedger", 4, 60, stopwatch(),
@@ -614,9 +615,10 @@ public:
return m_acceptedLedgerCache;
}
void gotTXSet (uint256 const& setHash, std::shared_ptr<SHAMap> const& set)
void gotTXSet (std::shared_ptr<SHAMap> const& set, bool fromAcquire)
{
m_networkOPs->mapComplete (setHash, set);
if (set)
m_networkOPs->mapComplete (set, fromAcquire);
}
TransactionMaster& getMasterTransaction () override