diff --git a/Builds/VisualStudio2015/RippleD.vcxproj b/Builds/VisualStudio2015/RippleD.vcxproj
index 739a4adf1..5b20f7352 100644
--- a/Builds/VisualStudio2015/RippleD.vcxproj
+++ b/Builds/VisualStudio2015/RippleD.vcxproj
@@ -1688,6 +1688,10 @@
True
True
+
+ True
+ True
+
True
True
diff --git a/Builds/VisualStudio2015/RippleD.vcxproj.filters b/Builds/VisualStudio2015/RippleD.vcxproj.filters
index a3941b5ea..57854a358 100644
--- a/Builds/VisualStudio2015/RippleD.vcxproj.filters
+++ b/Builds/VisualStudio2015/RippleD.vcxproj.filters
@@ -2436,6 +2436,9 @@
ripple\app\tests
+
+ ripple\app\tests
+
ripple\app\tests
diff --git a/src/ripple/app/ledger/OpenLedger.h b/src/ripple/app/ledger/OpenLedger.h
index 59bdd493e..1275b7083 100644
--- a/src/ripple/app/ledger/OpenLedger.h
+++ b/src/ripple/app/ledger/OpenLedger.h
@@ -28,7 +28,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -53,7 +52,6 @@ class OpenLedger
private:
beast::Journal j_;
CachedSLEs& cache_;
- Config const& config_;
std::mutex mutable modify_mutex_;
std::mutex mutable current_mutex_;
std::shared_ptr current_;
@@ -70,7 +68,7 @@ public:
explicit
OpenLedger(std::shared_ptr<
Ledger const> const& ledger,
- Config const& config, CachedSLEs& cache,
+ CachedSLEs& cache,
beast::Journal journal);
/** Returns `true` if there are no transactions.
@@ -165,8 +163,7 @@ public:
apply (Application& app, OpenView& view,
ReadView const& check, FwdRange const& txs,
OrderedTxs& retries, ApplyFlags flags,
- HashRouter& router, Config const& config,
- beast::Journal j);
+ HashRouter& router, beast::Journal j);
private:
enum Result
@@ -185,8 +182,7 @@ private:
apply_one (Application& app, OpenView& view,
std::shared_ptr< STTx const> const& tx,
bool retry, ApplyFlags flags,
- HashRouter& router, Config const& config,
- beast::Journal j);
+ HashRouter& router, beast::Journal j);
};
//------------------------------------------------------------------------------
@@ -196,8 +192,7 @@ void
OpenLedger::apply (Application& app, OpenView& view,
ReadView const& check, FwdRange const& txs,
OrderedTxs& retries, ApplyFlags flags,
- HashRouter& router, Config const& config,
- beast::Journal j)
+ HashRouter& router, beast::Journal j)
{
for (auto iter = txs.begin();
iter != txs.end(); ++iter)
@@ -210,7 +205,7 @@ OpenLedger::apply (Application& app, OpenView& view,
if (check.txExists(tx->getTransactionID()))
continue;
auto const result = apply_one(app, view,
- tx, true, flags, router, config, j);
+ tx, true, flags, router, j);
if (result == Result::retry)
retries.insert(tx);
}
@@ -231,7 +226,7 @@ OpenLedger::apply (Application& app, OpenView& view,
{
switch (apply_one(app, view,
iter->second, retry, flags,
- router, config, j))
+ router, j))
{
case Result::success:
++changes;
diff --git a/src/ripple/app/ledger/impl/LedgerConsensusImp.cpp b/src/ripple/app/ledger/impl/LedgerConsensusImp.cpp
index bbcbccd19..60be31e4f 100644
--- a/src/ripple/app/ledger/impl/LedgerConsensusImp.cpp
+++ b/src/ripple/app/ledger/impl/LedgerConsensusImp.cpp
@@ -42,8 +42,8 @@
#include
#include
#include
-#include
-#include
+#include
+#include
#include
#include
#include
@@ -1820,10 +1820,6 @@ applyTransaction (Application& app, OpenView& view,
if (retryAssured)
flags = flags | tapRETRY;
- if ((app.getHashRouter ().getFlags (txn->getTransactionID ())
- & SF_SIGGOOD) == SF_SIGGOOD)
- flags = flags | tapNO_CHECK_SIGN;
-
JLOG (j.debug) << "TXN "
<< txn->getTransactionID ()
//<< (engine.view().open() ? " open" : " closed")
@@ -1833,9 +1829,8 @@ applyTransaction (Application& app, OpenView& view,
try
{
- auto const result = apply(app, view, *txn, flags,
- app.getHashRouter().sigVerify(),
- app.config(), j);
+ auto const result = apply(app,
+ view, *txn, flags, j);
if (result.second)
{
JLOG (j.debug)
diff --git a/src/ripple/app/ledger/impl/LedgerMaster.cpp b/src/ripple/app/ledger/impl/LedgerMaster.cpp
index c98d530a7..b011834ba 100644
--- a/src/ripple/app/ledger/impl/LedgerMaster.cpp
+++ b/src/ripple/app/ledger/impl/LedgerMaster.cpp
@@ -378,13 +378,8 @@ public:
for (auto const& it : mHeldTransactions)
{
ApplyFlags flags = tapNONE;
- if (app_.getHashRouter().addSuppressionFlags (
- it.first.getTXID (), SF_SIGGOOD))
- flags = flags | tapNO_CHECK_SIGN;
-
auto const result = apply(app_, view,
- *it.second, flags, app_.getHashRouter(
- ).sigVerify(), app_.config(), j);
+ *it.second, flags, j);
if (result.second)
any = true;
}
diff --git a/src/ripple/app/ledger/impl/OpenLedger.cpp b/src/ripple/app/ledger/impl/OpenLedger.cpp
index 1294bd104..658a47324 100644
--- a/src/ripple/app/ledger/impl/OpenLedger.cpp
+++ b/src/ripple/app/ledger/impl/OpenLedger.cpp
@@ -21,17 +21,17 @@
#include
#include
#include
+#include
#include
namespace ripple {
OpenLedger::OpenLedger(std::shared_ptr<
Ledger const> const& ledger,
- Config const& config, CachedSLEs& cache,
+ CachedSLEs& cache,
beast::Journal journal)
: j_ (journal)
, cache_ (cache)
- , config_ (config)
, current_ (create(ledger->rules(), ledger))
{
}
@@ -89,7 +89,7 @@ OpenLedger::accept(Application& app, Rules const& rules,
std::vector>;
apply (app, *next, *ledger, empty{},
- retries, flags, router, config_, j_);
+ retries, flags, router, j_);
}
// Block calls to modify, otherwise
// new tx going into the open ledger
@@ -107,12 +107,11 @@ OpenLedger::accept(Application& app, Rules const& rules,
{
return p.first;
}),
- retries, flags, router, config_, j_);
+ retries, flags, router, j_);
// Apply local tx
for (auto const& item : locals)
- ripple::apply(app, *next, *item.second,
- flags, router.sigVerify(),
- config_, j_);
+ ripple::apply(app, *next,
+ *item.second, flags, j_);
// Switch to the new open view
std::lock_guard<
std::mutex> lock2(current_mutex_);
@@ -135,18 +134,12 @@ auto
OpenLedger::apply_one (Application& app, OpenView& view,
std::shared_ptr const& tx,
bool retry, ApplyFlags flags,
- HashRouter& router, Config const& config,
- beast::Journal j) -> Result
+ HashRouter& router,beast::Journal j) -> Result
{
if (retry)
flags = flags | tapRETRY;
- if ((router.getFlags(
- tx->getTransactionID()) & SF_SIGGOOD) ==
- SF_SIGGOOD)
- flags = flags | tapNO_CHECK_SIGN;
auto const result = ripple::apply(
- app, view, *tx, flags, router.
- sigVerify(), config, j);
+ app, view, *tx, flags, j);
if (result.second)
return Result::success;
if (isTefFailure (result.first) ||
diff --git a/src/ripple/app/main/Application.cpp b/src/ripple/app/main/Application.cpp
index 4701c16af..e06521c91 100644
--- a/src/ripple/app/main/Application.cpp
+++ b/src/ripple/app/main/Application.cpp
@@ -44,6 +44,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -1117,8 +1118,8 @@ ApplicationImp::startGenesisLedger()
next->setClosed ();
next->setImmutable (*config_);
m_networkOPs->setLastCloseTime (next->info().closeTime);
- openLedger_.emplace(next, *config_,
- cachedSLEs_, logs_->journal("OpenLedger"));
+ openLedger_.emplace(next, cachedSLEs_,
+ logs_->journal("OpenLedger"));
m_ledgerMaster->switchLCL (next);
}
@@ -1372,8 +1373,8 @@ bool ApplicationImp::loadOldLedger (
m_ledgerMaster->switchLCL (loadLedger);
m_ledgerMaster->forceValid(loadLedger);
m_networkOPs->setLastCloseTime (loadLedger->info().closeTime);
- openLedger_.emplace(loadLedger, *config_,
- cachedSLEs_, logs_->journal("OpenLedger"));
+ openLedger_.emplace(loadLedger, cachedSLEs_,
+ logs_->journal("OpenLedger"));
if (replay)
{
@@ -1395,7 +1396,8 @@ bool ApplicationImp::loadOldLedger (
auto s = std::make_shared ();
txPair.first->add(*s);
- getHashRouter().setFlags (txID, SF_SIGGOOD);
+ forceValidity(getHashRouter(),
+ txID, Validity::SigGoodOnly);
replayData->txns_.emplace (txIndex, txPair.first);
diff --git a/src/ripple/app/misc/HashRouter.cpp b/src/ripple/app/misc/HashRouter.cpp
index 71e03c336..609704a0e 100644
--- a/src/ripple/app/misc/HashRouter.cpp
+++ b/src/ripple/app/misc/HashRouter.cpp
@@ -19,131 +19,85 @@
#include
#include
-#include
#include
#include