@@ -542,6 +542,7 @@ static void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vec
542
542
void EraseObjectRequest (CNodeState* nodestate, const CInv& inv) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
543
543
{
544
544
AssertLockHeld (cs_main);
545
+ LogPrint (BCLog::NET, " %s -- inv=(%s)\n " , __func__, inv.ToString ());
545
546
g_already_asked_for.erase (inv.hash );
546
547
g_erased_object_requests.insert (std::make_pair (inv.hash , GetTimeMillis ()));
547
548
@@ -642,6 +643,8 @@ void RequestObject(CNodeState* state, const CInv& inv, int64_t nNow) EXCLUSIVE_L
642
643
int64_t process_time = CalculateObjectGetDataTime (inv, nNow, !state->fPreferredDownload );
643
644
644
645
peer_download_state.m_tx_process_time .emplace (process_time, inv);
646
+
647
+ LogPrint (BCLog::NET, " %s -- inv=(%s), nNow=%d, process_time=%d, delta=%d\n " , __func__, inv.ToString (), nNow, process_time, process_time - nNow);
645
648
}
646
649
647
650
void RequestObject (NodeId nodeId, const CInv& inv, int64_t nNow) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
@@ -2842,6 +2845,7 @@ bool PeerLogicValidation::SendMessages(CNode* pto, std::atomic<bool>& interruptM
2842
2845
// processing at a later time, see below)
2843
2846
tx_process_time.erase (tx_process_time.begin ());
2844
2847
if (g_erased_object_requests.count (inv.hash )) {
2848
+ LogPrint (BCLog::NET, " %s -- GETDATA skipping inv=(%s), peer=%d\n " , __func__, inv.ToString (), pto->GetId ());
2845
2849
state.m_tx_download .m_tx_announced .erase (inv);
2846
2850
state.m_tx_download .m_tx_in_flight .erase (inv);
2847
2851
continue ;
@@ -2866,11 +2870,13 @@ bool PeerLogicValidation::SendMessages(CNode* pto, std::atomic<bool>& interruptM
2866
2870
// requests to outbound peers).
2867
2871
int64_t next_process_time = CalculateObjectGetDataTime (inv, nNow, !state.fPreferredDownload );
2868
2872
tx_process_time.emplace (next_process_time, inv);
2873
+ LogPrint (BCLog::NET, " %s -- GETDATA re-queue inv=(%s), next_process_time=%d, delta=%d, peer=%d\n " , __func__, inv.ToString (), next_process_time, next_process_time - nNow, pto->GetId ());
2869
2874
}
2870
2875
} else {
2871
2876
// We have already seen this transaction, no need to download.
2872
2877
state.m_tx_download .m_tx_announced .erase (inv);
2873
2878
state.m_tx_download .m_tx_in_flight .erase (inv);
2879
+ LogPrint (BCLog::NET, " %s -- GETDATA already seen inv=(%s), peer=%d\n " , __func__, inv.ToString (), pto->GetId ());
2874
2880
}
2875
2881
}
2876
2882
if (!vGetData.empty ())
0 commit comments