@@ -142,8 +142,9 @@ namespace {
142
142
uint32_t nBlockSequenceId = 1 ;
143
143
144
144
/* *
145
- * Sources of received blocks, to be able to send them reject messages or ban
146
- * them, if processing happens afterwards. Protected by cs_main.
145
+ * Sources of received blocks, saved to be able to send them reject
146
+ * messages or ban them when processing happens afterwards. Protected by
147
+ * cs_main.
147
148
*/
148
149
map<uint256, NodeId> mapBlockSource;
149
150
@@ -389,7 +390,7 @@ void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vector<CBl
389
390
}
390
391
391
392
// If the peer reorganized, our previous pindexLastCommonBlock may not be an ancestor
392
- // of their current tip anymore. Go back enough to fix that.
393
+ // of its current tip anymore. Go back enough to fix that.
393
394
state->pindexLastCommonBlock = LastCommonAncestor (state->pindexLastCommonBlock , state->pindexBestKnownBlock );
394
395
if (state->pindexLastCommonBlock == state->pindexBestKnownBlock )
395
396
return ;
@@ -1721,7 +1722,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
1721
1722
// already refuses previously-known transaction ids entirely.
1722
1723
// This rule was originally applied to all blocks with a timestamp after March 15, 2012, 0:00 UTC.
1723
1724
// Now that the whole chain is irreversibly beyond that time it is applied to all blocks except the
1724
- // two in the chain that violate it. This prevents exploiting the issue against nodes in their
1725
+ // two in the chain that violate it. This prevents exploiting the issue against nodes during their
1725
1726
// initial block download.
1726
1727
bool fEnforceBIP30 = (!pindex->phashBlock ) || // Enforce on CreateNewBlock invocations which don't have a hash.
1727
1728
!((pindex->nHeight ==91842 && pindex->GetBlockHash () == uint256S (" 0x00000000000a4d0a398161ffc163c503763b1f4360639393e0e4c8e300e0caec" )) ||
@@ -2315,7 +2316,7 @@ bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex) {
2315
2316
}
2316
2317
2317
2318
// The resulting new best tip may not be in setBlockIndexCandidates anymore, so
2318
- // add them again.
2319
+ // add it again.
2319
2320
BlockMap::iterator it = mapBlockIndex.begin ();
2320
2321
while (it != mapBlockIndex.end ()) {
2321
2322
if (it->second ->IsValid (BLOCK_VALID_TRANSACTIONS) && it->second ->nChainTx && !setBlockIndexCandidates.value_comp ()(it->second , chainActive.Tip ())) {
@@ -3745,7 +3746,7 @@ void static ProcessGetData(CNode* pfrom)
3745
3746
// no response
3746
3747
}
3747
3748
3748
- // Trigger them to send a getblocks request for the next batch of inventory
3749
+ // Trigger the peer node to send a getblocks request for the next batch of inventory
3749
3750
if (inv.hash == pfrom->hashContinue )
3750
3751
{
3751
3752
// Bypass PushInventory, this must send even if redundant,
@@ -4141,8 +4142,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
4141
4142
pfrom->PushInventory (CInv (MSG_BLOCK, pindex->GetBlockHash ()));
4142
4143
if (--nLimit <= 0 )
4143
4144
{
4144
- // When this block is requested, we'll send an inv that'll make them
4145
- // getblocks the next batch of inventory.
4145
+ // When this block is requested, we'll send an inv that'll
4146
+ // trigger the peer to getblocks the next batch of inventory.
4146
4147
LogPrint (" net" , " getblocks stopping at limit %d %s\n " , pindex->nHeight , pindex->GetBlockHash ().ToString ());
4147
4148
pfrom->hashContinue = pindex->GetBlockHash ();
4148
4149
break ;
@@ -4379,9 +4380,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
4379
4380
4380
4381
// This asymmetric behavior for inbound and outbound connections was introduced
4381
4382
// to prevent a fingerprinting attack: an attacker can send specific fake addresses
4382
- // to users' AddrMan and later request them by sending getaddr messages.
4383
- // Making users ( which are behind NAT and can only make outgoing connections) ignore
4384
- // getaddr message mitigates the attack.
4383
+ // to users' AddrMan and later request them by sending getaddr messages.
4384
+ // Making nodes which are behind NAT and can only make outgoing connections ignore
4385
+ // the getaddr message mitigates the attack.
4385
4386
else if ((strCommand == " getaddr" ) && (pfrom->fInbound ))
4386
4387
{
4387
4388
pfrom->vAddrToSend .clear ();
@@ -4734,7 +4735,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
4734
4735
{
4735
4736
const Consensus::Params& consensusParams = Params ().GetConsensus ();
4736
4737
{
4737
- // Don't send anything until we get their version message
4738
+ // Don't send anything until we get its version message
4738
4739
if (pto->nVersion == 0 )
4739
4740
return true ;
4740
4741
0 commit comments