File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -295,6 +295,19 @@ class Tester
295
295
tracked += m_announcements[txhash][peer].m_state != State::NOTHING;
296
296
inflight += m_announcements[txhash][peer].m_state == State::REQUESTED;
297
297
candidates += m_announcements[txhash][peer].m_state == State::CANDIDATE;
298
+
299
+ std::bitset<MAX_PEERS> expected_announcers;
300
+ for (int peer = 0 ; peer < MAX_PEERS; ++peer) {
301
+ if (m_announcements[txhash][peer].m_state == State::CANDIDATE || m_announcements[txhash][peer].m_state == State::REQUESTED) {
302
+ expected_announcers[peer] = true ;
303
+ }
304
+ }
305
+ std::vector<NodeId> candidate_peers;
306
+ m_tracker.GetCandidatePeers (TXHASHES[txhash], candidate_peers);
307
+ assert (expected_announcers.count () == candidate_peers.size ());
308
+ for (const auto & peer : candidate_peers) {
309
+ assert (expected_announcers[peer]);
310
+ }
298
311
}
299
312
assert (m_tracker.Count (peer) == tracked);
300
313
assert (m_tracker.CountInFlight (peer) == inflight);
You can’t perform that action at this time.
0 commit comments