Skip to content

Commit

Permalink
Time checkAccept for each validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrippled committed Aug 25, 2024
1 parent 2bbdbb7 commit 91216d8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/xrpld/app/consensus/RCLConsensus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ RCLConsensus::Adaptor::validate(
// suppress it if we receive it
app_.getHashRouter().addSuppression(sha512Half(makeSlice(serialized)));

handleNewValidation(app_, v, "local");
handleNewValidation(app_, v, "local", j_);

// Broadcast to all our peers:
protocol::TMValidation val;
Expand Down
4 changes: 4 additions & 0 deletions src/xrpld/app/consensus/RCLValidations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ handleNewValidation(
Application& app,
std::shared_ptr<STValidation> const& val,
std::string const& source,
beast::Journal j,
bool jq)
{
auto const& signingKey = val->getSignerPublic();
Expand All @@ -179,8 +180,11 @@ handleNewValidation(

if (outcome == ValStatus::current)
{
auto const start = std::chrono::steady_clock::now();
if (val->isTrusted())
app.getLedgerMaster().checkAccept(hash, seq, jq);
JLOG(j.debug()) << "checkAccept validation hash seq durationus " << hash
<< ' ' << seq << ' ' << std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - start).count() << "us";
return;
}

Expand Down
1 change: 1 addition & 0 deletions src/xrpld/app/consensus/RCLValidations.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ handleNewValidation(
Application& app,
std::shared_ptr<STValidation> const& val,
std::string const& source,
beast::Journal j,
bool jq = false);

} // namespace ripple
Expand Down
2 changes: 1 addition & 1 deletion src/xrpld/app/misc/NetworkOPs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2306,7 +2306,7 @@ NetworkOPsImp::recvValidation(
JLOG(m_journal.trace())
<< "recvValidation " << val->getLedgerHash() << " from " << source;

handleNewValidation(app_, val, source, true);
handleNewValidation(app_, val, source, m_journal, true);

pubValidation(val);
std::stringstream ss;
Expand Down

0 comments on commit 91216d8

Please sign in to comment.