Skip to content

Commit 030539a

Browse files
committed
fix: update log records from CInstantSendManager for NetInstantSend instead and tidy up them a bit
1 parent 5464f52 commit 030539a

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/instantsend/net_instantsend.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ void NetInstantSend::ProcessMessage(CNode& pfrom, const std::string& msg_type, C
5757
}
5858

5959
if (!m_is_manager.AlreadyHave(CInv{MSG_ISDLOCK, hash})) {
60-
LogPrint(BCLog::INSTANTSEND, "CInstantSendManager::%s -- txid=%s, islock=%s: received islock, peer=%d\n",
61-
__func__, islock->txid.ToString(), hash.ToString(), pfrom.GetId());
60+
LogPrint(BCLog::INSTANTSEND, "-- ISDLOCK txid=%s, islock=%s: received islock, peer=%d\n",
61+
islock->txid.ToString(), hash.ToString(), pfrom.GetId());
6262

6363
m_is_manager.EnqueueInstantSendLock(pfrom.GetId(), hash, islock);
6464
}
@@ -162,9 +162,8 @@ Uint256HashSet NetInstantSend::ProcessPendingInstantSendLocks(
162162
batchVerifier.Verify();
163163
verifyTimer.stop();
164164

165-
LogPrint(BCLog::INSTANTSEND,
166-
"CInstantSendManager::%s -- verified locks. count=%d, alreadyVerified=%d, vt=%d, nodes=%d\n", __func__,
167-
verifyCount, alreadyVerified, verifyTimer.count(), batchVerifier.GetUniqueSourceCount());
165+
LogPrint(BCLog::INSTANTSEND, "NetInstantSend::%s -- verified locks. count=%d, alreadyVerified=%d, vt=%d, nodes=%d\n",
166+
__func__, verifyCount, alreadyVerified, verifyTimer.count(), batchVerifier.GetUniqueSourceCount());
168167

169168
Uint256HashSet badISLocks;
170169

@@ -182,7 +181,7 @@ Uint256HashSet NetInstantSend::ProcessPendingInstantSendLocks(
182181
const auto& islock = p.second.second;
183182

184183
if (batchVerifier.badMessages.count(hash)) {
185-
LogPrint(BCLog::INSTANTSEND, "CInstantSendManager::%s -- txid=%s, islock=%s: invalid sig in islock, peer=%d\n",
184+
LogPrint(BCLog::INSTANTSEND, "NetInstantSend::%s -- txid=%s, islock=%s: invalid sig in islock, peer=%d\n",
186185
__func__, islock->txid.ToString(), hash.ToString(), nodeId);
187186
badISLocks.emplace(hash);
188187
continue;
@@ -205,9 +204,9 @@ Uint256HashSet NetInstantSend::ProcessPendingInstantSendLocks(
205204
if (it != recSigs.end()) {
206205
auto recSig = std::make_shared<llmq::CRecoveredSig>(std::move(it->second));
207206
if (!m_is_manager.Sigman().HasRecoveredSigForId(llmq_params.type, recSig->getId())) {
208-
LogPrint(BCLog::INSTANTSEND,
209-
"CInstantSendManager::%s -- txid=%s, islock=%s: passing reconstructed recSig to signing mgr, "
210-
"peer=%d\n",
207+
LogPrint(BCLog::INSTANTSEND, /* Continued */
208+
"NetInstantSend::%s -- txid=%s, islock=%s: "
209+
"passing reconstructed recSig to signing mgr, peer=%d\n",
211210
__func__, islock->txid.ToString(), hash.ToString(), nodeId);
212211
m_is_manager.Sigman().PushReconstructedRecoveredSig(recSig);
213212
}
@@ -230,7 +229,7 @@ void NetInstantSend::ProcessPendingISLocks(Uint256HashMap<std::pair<NodeId, inst
230229
// First check against the current active set and don't ban
231230
auto bad_is_locks = ProcessPendingInstantSendLocks(llmq_params, /*signOffset=*/0, /*ban=*/false, locks_to_process);
232231
if (!bad_is_locks.empty()) {
233-
LogPrint(BCLog::INSTANTSEND, "CInstantSendManager::%s -- doing verification on old active set\n", __func__);
232+
LogPrint(BCLog::INSTANTSEND, "NetInstantSend::%s -- doing verification on old active set\n", __func__);
234233

235234
// filter out valid IS locks from "locks_to_process"
236235
for (auto it = locks_to_process.begin(); it != locks_to_process.end();) {

0 commit comments

Comments
 (0)