Skip to content

Commit 4d4a49e

Browse files
committed
CIS out, TX in
1 parent bcbcab7 commit 4d4a49e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/net_processing.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -4210,6 +4210,8 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
42104210
}
42114211

42124212
if (msg_type == NetMsgType::TX) {
4213+
auto event = g_event_logger->time_event("TX");
4214+
42134215
if (RejectIncomingTxs(pfrom)) {
42144216
LogDebug(BCLog::NET, "transaction sent in violation of protocol, %s", pfrom.DisconnectMsg(fLogIPs));
42154217
pfrom.fDisconnect = true;
@@ -4250,6 +4252,8 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
42504252
}
42514253

42524254
if (package_to_validate) {
4255+
event.add_metadata("pkg=1");
4256+
42534257
const auto package_result{ProcessNewPackage(m_chainman.ActiveChainstate(), m_mempool, package_to_validate->m_txns, /*test_accept=*/false, /*client_maxfeerate=*/std::nullopt)};
42544258
LogDebug(BCLog::TXPACKAGES, "package evaluation for %s: %s\n", package_to_validate->ToString(),
42554259
package_result.m_state.IsValid() ? "package accepted" : "package rejected");
@@ -4269,7 +4273,10 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
42694273
pfrom.m_last_tx_time = GetTime<std::chrono::seconds>();
42704274
}
42714275
if (state.IsInvalid()) {
4276+
event.add_metadata("invalid=1");
4277+
42724278
if (auto package_to_validate{ProcessInvalidTx(pfrom.GetId(), ptx, state, /*first_time_failure=*/true)}) {
4279+
event.add_metadata("pkg=1");
42734280
const auto package_result{ProcessNewPackage(m_chainman.ActiveChainstate(), m_mempool, package_to_validate->m_txns, /*test_accept=*/false, /*client_maxfeerate=*/std::nullopt)};
42744281
LogDebug(BCLog::TXPACKAGES, "package evaluation for %s: %s\n", package_to_validate->ToString(),
42754282
package_result.m_state.IsValid() ? "package accepted" : "package rejected");

src/validation.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -2169,13 +2169,8 @@ bool CheckInputScripts(const CTransaction& tx, TxValidationState& state,
21692169
{
21702170
if (tx.IsCoinBase()) return true;
21712171

2172-
auto event = g_event_logger->time_event("CIS");
2173-
21742172
if (pvChecks) {
21752173
pvChecks->reserve(tx.vin.size());
2176-
event.add_metadata("sync=0");
2177-
} else {
2178-
event.add_metadata("sync=1");
21792174
}
21802175

21812176
// First check if script executions have been cached with the same

0 commit comments

Comments
 (0)