mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Consolidate transaction signature checking.
* All checks flow through ripple::checkValidity, which transparently caches result flags. * All external transaction submission code paths use checkValidity. * SF_SIGGOOD flag no longer appears outside of HashRouter / checkValidity. * Validity can be forced in known or trusted scenarios.
This commit is contained in:
committed by
Nik Bougalis
parent
66b55f91ba
commit
9154cbf8e1
@@ -43,6 +43,7 @@
|
||||
#include <ripple/protocol/TER.h>
|
||||
#include <ripple/protocol/TxFlags.h>
|
||||
#include <ripple/protocol/types.h>
|
||||
#include <ripple/protocol/Feature.h>
|
||||
#include <memory>
|
||||
|
||||
namespace ripple {
|
||||
@@ -84,7 +85,7 @@ Env::Env (beast::unit_test::suite& test_)
|
||||
, closed_ (std::make_shared<Ledger>(
|
||||
create_genesis, app().config(), app().family()))
|
||||
, cachedSLEs_ (std::chrono::seconds(5), stopwatch_)
|
||||
, openLedger (closed_, app().config(), cachedSLEs_, journal)
|
||||
, openLedger (closed_, cachedSLEs_, journal)
|
||||
{
|
||||
memoize(master);
|
||||
Pathfinder::initPathTable();
|
||||
@@ -122,7 +123,7 @@ Env::close(NetClock::time_point const& closeTime)
|
||||
OpenView accum(&*next);
|
||||
OpenLedger::apply(app(), accum, *closed_,
|
||||
txs, retries, applyFlags(), *router,
|
||||
app().config(), journal);
|
||||
journal);
|
||||
accum.apply(*next);
|
||||
}
|
||||
// To ensure that the close time is exact and not rounded, we don't
|
||||
@@ -278,8 +279,7 @@ Env::submit (JTx const& jt)
|
||||
{
|
||||
std::tie(ter_, didApply) = ripple::apply(
|
||||
app(), view, *stx, applyFlags(),
|
||||
directSigVerify, app().config(),
|
||||
beast::Journal{});
|
||||
beast::Journal{});
|
||||
return didApply;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user