mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Fix issues
This commit is contained in:
@@ -20,14 +20,14 @@
|
||||
#include <xrpl/beast/utility/Journal.h>
|
||||
|
||||
#include <rapidjson/document.h>
|
||||
#include <rapidjson/writer.h>
|
||||
#include <rapidjson/stringbuffer.h>
|
||||
#include <rapidjson/writer.h>
|
||||
|
||||
#include <thread>
|
||||
#include <ranges>
|
||||
#include <ios>
|
||||
#include <ostream>
|
||||
#include <ranges>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
namespace beast {
|
||||
|
||||
@@ -151,8 +151,7 @@ Journal::JsonLogAttributes::setModuleName(std::string const& name)
|
||||
contextValues_.AddMember(
|
||||
rapidjson::StringRef("Module"),
|
||||
rapidjson::Value{name.c_str(), allocator_},
|
||||
allocator_
|
||||
);
|
||||
allocator_);
|
||||
}
|
||||
|
||||
Journal::JsonLogAttributes
|
||||
@@ -166,7 +165,7 @@ Journal::JsonLogAttributes::combine(
|
||||
|
||||
for (auto& member : b.GetObject())
|
||||
{
|
||||
auto val = rapidjson::Value{ member.value, result.allocator_ };
|
||||
auto val = rapidjson::Value{member.value, result.allocator_};
|
||||
if (result.contextValues_.HasMember(member.name))
|
||||
{
|
||||
result.contextValues_[member.name] = std::move(val);
|
||||
@@ -206,7 +205,8 @@ Journal::formatLog(
|
||||
|
||||
if (globalLogAttributes_)
|
||||
{
|
||||
for (auto const& [key, value] : globalLogAttributes_->contextValues().GetObject())
|
||||
for (auto const& [key, value] :
|
||||
globalLogAttributes_->contextValues().GetObject())
|
||||
{
|
||||
rapidjson::Value jsonValue;
|
||||
jsonValue.CopyFrom(value, currentJsonLogContext_.allocator);
|
||||
|
||||
@@ -178,7 +178,6 @@ public:
|
||||
void
|
||||
test_yield_and_stop()
|
||||
{
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
using namespace jtx;
|
||||
|
||||
@@ -230,7 +229,10 @@ public:
|
||||
try
|
||||
{
|
||||
th.join();
|
||||
} catch (const std::exception& e) {}
|
||||
}
|
||||
catch (std::exception const& e)
|
||||
{
|
||||
}
|
||||
pass();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
#include <xrpl/basics/Log.h>
|
||||
|
||||
#include <rapidjson/document.h>
|
||||
#include <doctest/doctest.h>
|
||||
#include <rapidjson/document.h>
|
||||
|
||||
using namespace ripple;
|
||||
|
||||
@@ -152,14 +152,16 @@ TEST_CASE("Global attributes")
|
||||
MockLogs logs{logStream, beast::severities::kAll};
|
||||
|
||||
beast::Journal::enableStructuredJournal();
|
||||
beast::Journal::addGlobalAttributes(log::attributes(log::attr("Field1", "Value1")));
|
||||
beast::Journal::addGlobalAttributes(
|
||||
log::attributes(log::attr("Field1", "Value1")));
|
||||
|
||||
logs.journal("Test").debug() << "Test";
|
||||
|
||||
rapidjson::Document jsonLog;
|
||||
jsonLog.Parse(logStream.str().c_str());
|
||||
|
||||
CHECK(jsonLog.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
CHECK(
|
||||
jsonLog.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(jsonLog.IsObject());
|
||||
CHECK(jsonLog.HasMember("Field1"));
|
||||
@@ -175,18 +177,21 @@ TEST_CASE("Global attributes inheritable")
|
||||
MockLogs logs{logStream, beast::severities::kAll};
|
||||
|
||||
beast::Journal::enableStructuredJournal();
|
||||
beast::Journal::addGlobalAttributes(log::attributes(log::attr("Field1", "Value1")));
|
||||
beast::Journal::addGlobalAttributes(
|
||||
log::attributes(log::attr("Field1", "Value1")));
|
||||
|
||||
logs.journal(
|
||||
"Test",
|
||||
log::attributes(log::attr("Field1", "Value3"), log::attr("Field2", "Value2")))
|
||||
log::attributes(
|
||||
log::attr("Field1", "Value3"), log::attr("Field2", "Value2")))
|
||||
.debug()
|
||||
<< "Test";
|
||||
|
||||
rapidjson::Document jsonLog;
|
||||
jsonLog.Parse(logStream.str().c_str());
|
||||
|
||||
CHECK(jsonLog.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
CHECK(
|
||||
jsonLog.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(jsonLog.IsObject());
|
||||
CHECK(jsonLog.HasMember("Field1"));
|
||||
@@ -265,7 +270,8 @@ TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJsonLogFields")
|
||||
rapidjson::Document logValue;
|
||||
logValue.Parse(stream().str().c_str());
|
||||
|
||||
CHECK(logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
CHECK(
|
||||
logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(logValue.IsObject());
|
||||
CHECK(logValue.HasMember("Function"));
|
||||
@@ -294,7 +300,9 @@ TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJsonLogLevels")
|
||||
rapidjson::Document logValue;
|
||||
logValue.Parse(stream().str().c_str());
|
||||
|
||||
CHECK(logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
CHECK(
|
||||
logValue.GetParseError() ==
|
||||
rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(
|
||||
logValue["Level"].GetString() ==
|
||||
@@ -308,8 +316,9 @@ TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJsonLogLevels")
|
||||
rapidjson::Document logValue;
|
||||
logValue.Parse(stream().str().c_str());
|
||||
|
||||
CHECK(logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(
|
||||
logValue.GetParseError() ==
|
||||
rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(
|
||||
logValue["Level"].GetString() ==
|
||||
@@ -323,8 +332,9 @@ TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJsonLogLevels")
|
||||
rapidjson::Document logValue;
|
||||
logValue.Parse(stream().str().c_str());
|
||||
|
||||
CHECK(logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(
|
||||
logValue.GetParseError() ==
|
||||
rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(
|
||||
logValue["Level"].GetString() ==
|
||||
@@ -338,8 +348,9 @@ TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJsonLogLevels")
|
||||
rapidjson::Document logValue;
|
||||
logValue.Parse(stream().str().c_str());
|
||||
|
||||
CHECK(logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(
|
||||
logValue.GetParseError() ==
|
||||
rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(
|
||||
logValue["Level"].GetString() ==
|
||||
@@ -353,8 +364,9 @@ TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJsonLogLevels")
|
||||
rapidjson::Document logValue;
|
||||
logValue.Parse(stream().str().c_str());
|
||||
|
||||
CHECK(logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(
|
||||
logValue.GetParseError() ==
|
||||
rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(
|
||||
logValue["Level"].GetString() ==
|
||||
@@ -368,7 +380,9 @@ TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJsonLogLevels")
|
||||
rapidjson::Document logValue;
|
||||
logValue.Parse(stream().str().c_str());
|
||||
|
||||
CHECK(logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
CHECK(
|
||||
logValue.GetParseError() ==
|
||||
rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(
|
||||
logValue["Level"].GetString() ==
|
||||
@@ -383,7 +397,8 @@ TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJsonLogStream")
|
||||
rapidjson::Document logValue;
|
||||
logValue.Parse(stream().str().c_str());
|
||||
|
||||
CHECK(logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
CHECK(
|
||||
logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(
|
||||
logValue["Level"].GetString() ==
|
||||
@@ -400,7 +415,8 @@ TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJsonLogParams")
|
||||
rapidjson::Document logValue;
|
||||
logValue.Parse(stream().str().c_str());
|
||||
|
||||
CHECK(logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
CHECK(
|
||||
logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(logValue["Params"].IsObject());
|
||||
CHECK(logValue["Params"]["Field1"].IsNumber());
|
||||
@@ -409,9 +425,13 @@ TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJsonLogParams")
|
||||
// NOTE: We should expect it to be an int64 after we make the json library
|
||||
// support in64 and uint64
|
||||
CHECK(logValue["Params"]["Field2"].IsNumber());
|
||||
CHECK(logValue["Params"]["Field2"].GetUint64() == std::numeric_limits<std::uint64_t>::max());
|
||||
CHECK(
|
||||
logValue["Params"]["Field2"].GetUint64() ==
|
||||
std::numeric_limits<std::uint64_t>::max());
|
||||
CHECK(logValue["Message"].IsString());
|
||||
CHECK(logValue["Message"].GetString() == std::string{"Test: 1, 18446744073709551615"});
|
||||
CHECK(
|
||||
logValue["Message"].GetString() ==
|
||||
std::string{"Test: 1, 18446744073709551615"});
|
||||
}
|
||||
|
||||
TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJsonLogFields")
|
||||
@@ -424,8 +444,8 @@ TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJsonLogFields")
|
||||
rapidjson::Document logValue;
|
||||
logValue.Parse(stream().str().c_str());
|
||||
|
||||
CHECK(logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(
|
||||
logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(logValue["Params"].IsObject());
|
||||
CHECK(logValue["Params"]["Field1"].IsNumber());
|
||||
@@ -434,7 +454,9 @@ TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJsonLogFields")
|
||||
// NOTE: We should expect it to be an int64 after we make the json library
|
||||
// support in64 and uint64
|
||||
CHECK(logValue["Params"]["Field2"].IsNumber());
|
||||
CHECK(logValue["Params"]["Field2"].GetUint64() == std::numeric_limits<std::uint64_t>::max());
|
||||
CHECK(
|
||||
logValue["Params"]["Field2"].GetUint64() ==
|
||||
std::numeric_limits<std::uint64_t>::max());
|
||||
CHECK(logValue["Message"].IsString());
|
||||
CHECK(logValue["Message"].GetString() == std::string{"Test"});
|
||||
}
|
||||
@@ -442,14 +464,16 @@ TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJsonLogFields")
|
||||
TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJournalAttributes")
|
||||
{
|
||||
beast::Journal j{
|
||||
journal(), log::attributes(log::attr("Field1", "Value1"), log::attr("Field2", 2))};
|
||||
journal(),
|
||||
log::attributes(log::attr("Field1", "Value1"), log::attr("Field2", 2))};
|
||||
|
||||
j.debug() << "Test";
|
||||
|
||||
rapidjson::Document logValue;
|
||||
logValue.Parse(stream().str().c_str());
|
||||
|
||||
CHECK(logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
CHECK(
|
||||
logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(logValue["Field1"].IsString());
|
||||
CHECK(logValue["Field1"].GetString() == std::string{"Value1"});
|
||||
@@ -460,16 +484,19 @@ TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJournalAttributes")
|
||||
TEST_CASE_FIXTURE(JsonLogStreamFixture, "TestJournalAttributesInheritable")
|
||||
{
|
||||
beast::Journal j{
|
||||
journal(), log::attributes(log::attr("Field1", "Value1"), log::attr("Field2", 2))};
|
||||
journal(),
|
||||
log::attributes(log::attr("Field1", "Value1"), log::attr("Field2", 2))};
|
||||
beast::Journal j2{
|
||||
j, log::attributes(log::attr("Field3", "Value3"), log::attr("Field2", 0))};
|
||||
j,
|
||||
log::attributes(log::attr("Field3", "Value3"), log::attr("Field2", 0))};
|
||||
|
||||
j2.debug() << "Test";
|
||||
|
||||
rapidjson::Document logValue;
|
||||
logValue.Parse(stream().str().c_str());
|
||||
|
||||
CHECK(logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
CHECK(
|
||||
logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(logValue["Field1"].IsString());
|
||||
CHECK(logValue["Field1"].GetString() == std::string{"Value1"});
|
||||
@@ -488,14 +515,16 @@ TEST_CASE_FIXTURE(
|
||||
journal(),
|
||||
log::attributes(log::attr("Field1", "Value1"), log::attr("Field2", 2))};
|
||||
beast::Journal j2{
|
||||
j, log::attributes(log::attr("Field3", "Value3"), log::attr("Field2", 0))};
|
||||
j,
|
||||
log::attributes(log::attr("Field3", "Value3"), log::attr("Field2", 0))};
|
||||
|
||||
j2.debug() << "Test";
|
||||
|
||||
rapidjson::Document logValue;
|
||||
logValue.Parse(stream().str().c_str());
|
||||
|
||||
CHECK(logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
CHECK(
|
||||
logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(logValue["Field1"].IsString());
|
||||
CHECK(logValue["Field1"].GetString() == std::string{"Value1"});
|
||||
@@ -523,7 +552,8 @@ TEST_CASE_FIXTURE(
|
||||
rapidjson::Document logValue;
|
||||
logValue.Parse(stream().str().c_str());
|
||||
|
||||
CHECK(logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
CHECK(
|
||||
logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(logValue["Field1"].IsString());
|
||||
CHECK(logValue["Field1"].GetString() == std::string{"Value1"});
|
||||
@@ -548,7 +578,8 @@ TEST_CASE_FIXTURE(
|
||||
rapidjson::Document logValue;
|
||||
logValue.Parse(stream().str().c_str());
|
||||
|
||||
CHECK(logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
CHECK(
|
||||
logValue.GetParseError() == rapidjson::ParseErrorCode::kParseErrorNone);
|
||||
|
||||
CHECK(logValue["Field1"].IsString());
|
||||
CHECK(logValue["Field1"].GetString() == std::string{"Value1"});
|
||||
|
||||
@@ -1109,7 +1109,10 @@ RclConsensusLogger::RclConsensusLogger(
|
||||
bool const validating,
|
||||
beast::Journal j,
|
||||
std::source_location location)
|
||||
: j_(j, log::attributes(log::attr("Role", "ConsensusLogger"), log::attr("Label", label)))
|
||||
: j_(j,
|
||||
log::attributes(
|
||||
log::attr("Role", "ConsensusLogger"),
|
||||
log::attr("Label", label)))
|
||||
, location_(location)
|
||||
{
|
||||
if (!validating && !j.info())
|
||||
|
||||
@@ -1260,7 +1260,8 @@ NetworkOPsImp::preProcessTransaction(std::shared_ptr<Transaction>& transaction)
|
||||
{
|
||||
beast::Journal journal{
|
||||
m_journal,
|
||||
log::attributes(log::attr("TransactionID", to_string(transaction->getID())))};
|
||||
log::attributes(
|
||||
log::attr("TransactionID", to_string(transaction->getID())))};
|
||||
auto const newFlags = app_.getHashRouter().getFlags(transaction->getID());
|
||||
|
||||
if ((newFlags & HashRouterFlags::BAD) != HashRouterFlags::UNDEFINED)
|
||||
|
||||
@@ -211,8 +211,7 @@ Transactor::Transactor(ApplyContext& ctx)
|
||||
, j_(ctx.journal,
|
||||
log::attributes(
|
||||
log::attr("TransactionID", to_string(ctx_.tx.getTransactionID())),
|
||||
log::attr("AccountID", to_string(account_))
|
||||
))
|
||||
log::attr("AccountID", to_string(account_))))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -55,8 +55,7 @@ public:
|
||||
, j(j_,
|
||||
log::attributes(
|
||||
log::attr("TransactionID", to_string(tx.getTransactionID())),
|
||||
log::attr("AccountID", to_string(tx.getAccountID(sfAccount)))
|
||||
))
|
||||
log::attr("AccountID", to_string(tx.getAccountID(sfAccount)))))
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
(flags_ & tapBATCH) == tapBATCH, "Batch apply flag should be set");
|
||||
@@ -107,8 +106,7 @@ public:
|
||||
, j(j_,
|
||||
log::attributes(
|
||||
log::attr("TransactionID", to_string(tx.getTransactionID())),
|
||||
log::attr("AccountID", to_string(tx.getAccountID(sfAccount)))
|
||||
))
|
||||
log::attr("AccountID", to_string(tx.getAccountID(sfAccount)))))
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
parentBatchId.has_value() == ((flags_ & tapBATCH) == tapBATCH),
|
||||
|
||||
@@ -101,7 +101,8 @@ JobQueue::Coro::resume()
|
||||
|
||||
XRPL_ASSERT(
|
||||
jq_.nSuspend_ > 0,
|
||||
"ripple::JobQueue::Coro::resume jq_.nSuspend_ should be greater than 0");
|
||||
"ripple::JobQueue::Coro::resume jq_.nSuspend_ should be greater "
|
||||
"than 0");
|
||||
--jq_.nSuspend_;
|
||||
}
|
||||
auto saved = detail::getLocalValues().release();
|
||||
@@ -141,7 +142,8 @@ JobQueue::Coro::expectEarlyExit()
|
||||
|
||||
XRPL_ASSERT(
|
||||
jq_.nSuspend_ > 0,
|
||||
"ripple::JobQueue::Coro::expectEarlyExit() jq_.nSuspend_ should be greater than 0");
|
||||
"ripple::JobQueue::Coro::expectEarlyExit() jq_.nSuspend_ should be "
|
||||
"greater than 0");
|
||||
--jq_.nSuspend_;
|
||||
#ifndef NDEBUG
|
||||
finished_ = true;
|
||||
|
||||
@@ -305,8 +305,9 @@ JobQueue::stop()
|
||||
// `Job::doJob` and the return of `JobQueue::processTask`. That is why
|
||||
// we must wait on the condition variable to make these assertions.
|
||||
std::unique_lock lock(m_mutex);
|
||||
cv_.wait(
|
||||
lock, [this] { return m_processCount == 0 && nSuspend_ == 0 && m_jobSet.empty(); });
|
||||
cv_.wait(lock, [this] {
|
||||
return m_processCount == 0 && nSuspend_ == 0 && m_jobSet.empty();
|
||||
});
|
||||
XRPL_ASSERT(
|
||||
m_processCount == 0,
|
||||
"ripple::JobQueue::stop : all processes completed");
|
||||
|
||||
@@ -165,7 +165,8 @@ OverlayImpl::onHandoff(
|
||||
endpoint_type remote_endpoint)
|
||||
{
|
||||
auto const id = next_id_++;
|
||||
auto journal = app_.journal("Peer", log::attributes(log::attr("NodeID", id)));
|
||||
auto journal =
|
||||
app_.journal("Peer", log::attributes(log::attr("NodeID", id)));
|
||||
|
||||
Handoff handoff;
|
||||
if (processRequest(request, handoff))
|
||||
|
||||
@@ -81,14 +81,18 @@ PeerImp::PeerImp(
|
||||
app_.journal("Peer"),
|
||||
log::attributes(
|
||||
log::attr("NodeID", id),
|
||||
log::attr("RemoteAddress", to_string(slot->remote_endpoint())),
|
||||
log::attr("PublicKey", toBase58(TokenType::NodePublic, publicKey))))
|
||||
log::attr("RemoteAddress", to_string(slot->remote_endpoint())),
|
||||
log::attr(
|
||||
"PublicKey",
|
||||
toBase58(TokenType::NodePublic, publicKey))))
|
||||
, p_journal_(
|
||||
app_.journal("Protocol"),
|
||||
log::attributes(
|
||||
log::attr("NodeID", id),
|
||||
log::attr("RemoteAddress", to_string(slot->remote_endpoint())),
|
||||
log::attr("PublicKey", toBase58(TokenType::NodePublic, publicKey))))
|
||||
log::attr("RemoteAddress", to_string(slot->remote_endpoint())),
|
||||
log::attr(
|
||||
"PublicKey",
|
||||
toBase58(TokenType::NodePublic, publicKey))))
|
||||
, stream_ptr_(std::move(stream_ptr))
|
||||
, socket_(stream_ptr_->next_layer().socket())
|
||||
, stream_(*stream_ptr_)
|
||||
@@ -1305,8 +1309,7 @@ PeerImp::handleTransaction(
|
||||
p_journal_,
|
||||
log::attributes(
|
||||
log::attr("TransactionID", to_string(txID)),
|
||||
log::attr("RawTransaction", strHex(m->rawtransaction()))
|
||||
)};
|
||||
log::attr("RawTransaction", strHex(m->rawtransaction())))};
|
||||
|
||||
// Charge strongly for attempting to relay a txn with tfInnerBatchTxn
|
||||
// LCOV_EXCL_START
|
||||
|
||||
@@ -661,14 +661,18 @@ PeerImp::PeerImp(
|
||||
app_.journal("Peer"),
|
||||
log::attributes(
|
||||
log::attr("NodeID", id),
|
||||
log::attr("RemoteAddress", to_string(slot->remote_endpoint())),
|
||||
log::attr("PublicKey", toBase58(TokenType::NodePublic, publicKey))))
|
||||
log::attr("RemoteAddress", to_string(slot->remote_endpoint())),
|
||||
log::attr(
|
||||
"PublicKey",
|
||||
toBase58(TokenType::NodePublic, publicKey))))
|
||||
, p_journal_(
|
||||
app_.journal("Protocol"),
|
||||
log::attributes(
|
||||
log::attr("NodeID", id),
|
||||
log::attr("RemoteAddress", to_string(slot->remote_endpoint())),
|
||||
log::attr("PublicKey", toBase58(TokenType::NodePublic, publicKey))))
|
||||
log::attr("RemoteAddress", to_string(slot->remote_endpoint())),
|
||||
log::attr(
|
||||
"PublicKey",
|
||||
toBase58(TokenType::NodePublic, publicKey))))
|
||||
, stream_ptr_(std::move(stream_ptr))
|
||||
, socket_(stream_ptr_->next_layer().socket())
|
||||
, stream_(*stream_ptr_)
|
||||
|
||||
Reference in New Issue
Block a user