Refactor SuppressionTable into IHashRouter

Conflicts:
	src/cpp/ripple/Application.h
This commit is contained in:
Vinnie Falco
2013-06-02 22:40:36 -07:00
parent fb487bdb41
commit 594c47f16b
14 changed files with 284 additions and 250 deletions

View File

@@ -292,7 +292,7 @@ void NetworkOPs::runTransactionQueue()
if (didApply || (mMode != omFULL))
{
std::set<uint64> peers;
if (theApp->getSuppression().swapSet(txn->getID(), peers, SF_RELAYED))
if (theApp->getHashRouter().swapSet(txn->getID(), peers, SF_RELAYED))
{
ripple::TMTransaction tx;
Serializer s;
@@ -318,7 +318,7 @@ Transaction::pointer NetworkOPs::processTransaction(Transaction::pointer trans,
{
LoadEvent::autoptr ev = theApp->getJobQueue().getLoadEventAP(jtTXN_PROC, "ProcessTXN");
int newFlags = theApp->getSuppression().getFlags(trans->getID());
int newFlags = theApp->getHashRouter().getFlags(trans->getID());
if ((newFlags & SF_BAD) != 0)
{ // cached bad
trans->setStatus(INVALID);
@@ -392,7 +392,7 @@ Transaction::pointer NetworkOPs::processTransaction(Transaction::pointer trans,
if (didApply || (mMode != omFULL))
{
std::set<uint64> peers;
if (theApp->getSuppression().swapSet(trans->getID(), peers, SF_RELAYED))
if (theApp->getHashRouter().swapSet(trans->getID(), peers, SF_RELAYED))
{
ripple::TMTransaction tx;
Serializer s;
@@ -921,7 +921,7 @@ void NetworkOPs::processTrustedProposal(LedgerProposal::pointer proposal,
if (relay)
{
std::set<uint64> peers;
theApp->getSuppression().swapSet(proposal->getSuppression(), peers, SF_RELAYED);
theApp->getHashRouter().swapSet(proposal->getHashRouter(), peers, SF_RELAYED);
PackedMessage::pointer message = boost::make_shared<PackedMessage>(*set, ripple::mtPROPOSE_LEDGER);
theApp->getConnectionPool().relayMessageBut(peers, message);
}