mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Use injected Logs
This commit is contained in:
@@ -21,15 +21,15 @@
|
||||
#include <ripple/app/ledger/LedgerTiming.h>
|
||||
#include <ripple/app/ledger/impl/ConsensusImp.h>
|
||||
#include <ripple/app/ledger/impl/LedgerConsensusImp.h>
|
||||
#include <ripple/basics/Log.h>
|
||||
#include <beast/utility/Journal.h>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
ConsensusImp::ConsensusImp (FeeVote::Setup const& voteSetup)
|
||||
: journal_ (deprecatedLogs().journal("Consensus"))
|
||||
ConsensusImp::ConsensusImp (
|
||||
FeeVote::Setup const& voteSetup,
|
||||
Logs& logs)
|
||||
: journal_ (logs.journal("Consensus"))
|
||||
, feeVote_ (make_FeeVote (voteSetup,
|
||||
deprecatedLogs().journal("FeeVote")))
|
||||
logs.journal("FeeVote")))
|
||||
, proposing_ (false)
|
||||
, validating_ (false)
|
||||
, lastCloseProposers_ (0)
|
||||
@@ -174,10 +174,11 @@ ConsensusImp::peekStoredProposals ()
|
||||
//==============================================================================
|
||||
|
||||
std::unique_ptr<Consensus>
|
||||
make_Consensus (Config const& config)
|
||||
make_Consensus (Config const& config, Logs& logs)
|
||||
{
|
||||
return std::make_unique<ConsensusImp> (
|
||||
setup_FeeVote (config.section ("voting")));
|
||||
setup_FeeVote (config.section ("voting")),
|
||||
logs);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <ripple/app/ledger/Consensus.h>
|
||||
#include <ripple/app/ledger/LedgerConsensus.h>
|
||||
#include <ripple/app/misc/FeeVote.h>
|
||||
#include <ripple/basics/Log.h>
|
||||
#include <ripple/protocol/STValidation.h>
|
||||
#include <ripple/shamap/SHAMap.h>
|
||||
#include <beast/utility/Journal.h>
|
||||
@@ -35,7 +36,7 @@ class ConsensusImp
|
||||
: public Consensus
|
||||
{
|
||||
public:
|
||||
ConsensusImp (FeeVote::Setup const& voteSetup);
|
||||
ConsensusImp (FeeVote::Setup const& voteSetup, Logs& logs);
|
||||
|
||||
~ConsensusImp () = default;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ enum
|
||||
InboundLedger::InboundLedger (
|
||||
Application& app, uint256 const& hash, std::uint32_t seq, fcReason reason, clock_type& clock)
|
||||
: PeerSet (app, hash, ledgerAcquireTimeoutMillis, false, clock,
|
||||
deprecatedLogs().journal("InboundLedger"))
|
||||
app.logs().journal("InboundLedger"))
|
||||
, mHaveHeader (false)
|
||||
, mHaveState (false)
|
||||
, mHaveTransactions (false)
|
||||
|
||||
@@ -1083,7 +1083,7 @@ void LedgerConsensusImp::accept (std::shared_ptr<SHAMap> set)
|
||||
|
||||
if (mValidating &&
|
||||
! ledgerMaster_.isCompatible (newLCL,
|
||||
deprecatedLogs().journal("LedgerConsensus").warning,
|
||||
app_.logs().journal("LedgerConsensus").warning,
|
||||
"Not validating"))
|
||||
{
|
||||
mValidating = false;
|
||||
@@ -1424,7 +1424,7 @@ void LedgerConsensusImp::takeInitialPosition (
|
||||
std::shared_ptr<ReadView const> const& initialLedger)
|
||||
{
|
||||
std::shared_ptr<SHAMap> initialSet = std::make_shared <SHAMap> (
|
||||
SHAMapType::TRANSACTION, app_.family(), deprecatedLogs().journal("SHAMap"));
|
||||
SHAMapType::TRANSACTION, app_.family());
|
||||
|
||||
// Build SHAMap containing all transactions in our open ledger
|
||||
for (auto const& tx : initialLedger->txs)
|
||||
@@ -1829,8 +1829,7 @@ applyTransaction (Application& app, OpenView& view,
|
||||
{
|
||||
auto const result = apply(app, view, *txn, flags,
|
||||
app.getHashRouter().sigVerify(),
|
||||
app.config(), deprecatedLogs().
|
||||
journal("LedgerConsensus"));
|
||||
app.config(), app.logs().journal("LedgerConsensus"));
|
||||
if (result.second)
|
||||
{
|
||||
WriteLog (lsDEBUG, LedgerConsensus)
|
||||
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
, mLedgerHistory (collector, app)
|
||||
, mHeldTransactions (uint256 ())
|
||||
, mLedgerCleaner (make_LedgerCleaner (
|
||||
app, *this, deprecatedLogs().journal("LedgerCleaner")))
|
||||
app, *this, app_.logs().journal("LedgerCleaner")))
|
||||
, mMinValidations (0)
|
||||
, mLastValidateSeq (0)
|
||||
, mAdvanceThread (false)
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
, ledger_history_ (app_.config().LEDGER_HISTORY)
|
||||
, ledger_fetch_size_ (app_.config().getSize (siLedgerFetch))
|
||||
, fetch_packs_ ("FetchPack", 65536, 45, stopwatch,
|
||||
deprecatedLogs().journal("TaggedCache"))
|
||||
app_.logs().journal("TaggedCache"))
|
||||
, fetch_seq_ (0)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user