mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Refactor SuppressionTable into IHashRouter
Conflicts: src/cpp/ripple/Application.h
This commit is contained in:
@@ -36,6 +36,7 @@ Application::Application ()
|
||||
// VFALCO: New stuff
|
||||
, mFeeVote (IFeeVote::New (10, 50 * SYSTEM_CURRENCY_PARTS, 12.5 * SYSTEM_CURRENCY_PARTS))
|
||||
, mFeeTrack (ILoadFeeTrack::New ())
|
||||
, mHashRouter (IHashRouter::New (IHashRouter::getDefaultHoldTime ()))
|
||||
, mValidations (IValidations::New ())
|
||||
, mUNL (IUniqueNodeList::New (mIOService))
|
||||
// VFALCO: End new stuff
|
||||
@@ -105,6 +106,7 @@ void sigIntHandler(int)
|
||||
}
|
||||
#endif
|
||||
|
||||
// VFALCO: TODO, Figure this out it looks like the wrong tool
|
||||
static void runAux(boost::asio::io_service& svc)
|
||||
{
|
||||
setCallingThreadName("aux");
|
||||
@@ -117,6 +119,26 @@ static void runIO(boost::asio::io_service& io)
|
||||
io.run();
|
||||
}
|
||||
|
||||
bool Application::isNew(const uint256& s)
|
||||
{
|
||||
return mHashRouter->addSuppression(s);
|
||||
}
|
||||
|
||||
bool Application::isNew(const uint256& s, uint64 p)
|
||||
{
|
||||
return mHashRouter->addSuppressionPeer(s, p);
|
||||
}
|
||||
|
||||
bool Application::isNew(const uint256& s, uint64 p, int& f)
|
||||
{
|
||||
return mHashRouter->addSuppressionPeer(s, p, f);
|
||||
}
|
||||
|
||||
bool Application::isNewFlag(const uint256& s, int f)
|
||||
{
|
||||
return mHashRouter->setFlag(s, f);
|
||||
}
|
||||
|
||||
void Application::setup()
|
||||
{
|
||||
mJobQueue.setThreadCount();
|
||||
|
||||
Reference in New Issue
Block a user