mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-27 07:14:48 +00:00
Merge #9604: [Trivial] add comment about setting peer as HB peer.
dd5b011 [Trivial] add comment about setting peer as HB peer. (John Newbery)
This commit is contained in:
commit
729de15b63
@ -863,7 +863,15 @@ void PeerLogicValidation::BlockChecked(const CBlock& block, const CValidationSta
|
||||
Misbehaving(it->second.first, nDoS);
|
||||
}
|
||||
}
|
||||
else if (state.IsValid() && !IsInitialBlockDownload() && mapBlocksInFlight.count(hash) == mapBlocksInFlight.size()) {
|
||||
// Check that:
|
||||
// 1. The block is valid
|
||||
// 2. We're not in initial block download
|
||||
// 3. This is currently the best block we're aware of. We haven't updated
|
||||
// the tip yet so we have no way to check this directly here. Instead we
|
||||
// just check that there are currently no other blocks in flight.
|
||||
else if (state.IsValid() &&
|
||||
!IsInitialBlockDownload() &&
|
||||
mapBlocksInFlight.count(hash) == mapBlocksInFlight.size()) {
|
||||
if (it != mapBlockSource.end()) {
|
||||
MaybeSetPeerAsAnnouncingHeaderAndIDs(it->second.first, *connman);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user