@@ -4210,6 +4210,8 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
4210
4210
}
4211
4211
4212
4212
if (msg_type == NetMsgType::TX) {
4213
+ auto event = g_event_logger->time_event (" TX" );
4214
+
4213
4215
if (RejectIncomingTxs (pfrom)) {
4214
4216
LogDebug (BCLog::NET, " transaction sent in violation of protocol, %s" , pfrom.DisconnectMsg (fLogIPs ));
4215
4217
pfrom.fDisconnect = true ;
@@ -4250,6 +4252,8 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
4250
4252
}
4251
4253
4252
4254
if (package_to_validate) {
4255
+ event.add_metadata (" pkg=1" );
4256
+
4253
4257
const auto package_result{ProcessNewPackage (m_chainman.ActiveChainstate (), m_mempool, package_to_validate->m_txns , /* test_accept=*/ false , /* client_maxfeerate=*/ std::nullopt)};
4254
4258
LogDebug (BCLog::TXPACKAGES, " package evaluation for %s: %s\n " , package_to_validate->ToString (),
4255
4259
package_result.m_state .IsValid () ? " package accepted" : " package rejected" );
@@ -4269,7 +4273,10 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
4269
4273
pfrom.m_last_tx_time = GetTime<std::chrono::seconds>();
4270
4274
}
4271
4275
if (state.IsInvalid ()) {
4276
+ event.add_metadata (" invalid=1" );
4277
+
4272
4278
if (auto package_to_validate{ProcessInvalidTx (pfrom.GetId (), ptx, state, /* first_time_failure=*/ true )}) {
4279
+ event.add_metadata (" pkg=1" );
4273
4280
const auto package_result{ProcessNewPackage (m_chainman.ActiveChainstate (), m_mempool, package_to_validate->m_txns , /* test_accept=*/ false , /* client_maxfeerate=*/ std::nullopt)};
4274
4281
LogDebug (BCLog::TXPACKAGES, " package evaluation for %s: %s\n " , package_to_validate->ToString (),
4275
4282
package_result.m_state .IsValid () ? " package accepted" : " package rejected" );
0 commit comments