@@ -117,8 +117,8 @@ namespace {
117
117
int nSyncStarted GUARDED_BY (cs_main) = 0;
118
118
119
119
/* *
120
- * Sources of received blocks, saved to be able to send them reject
121
- * messages or ban them when processing happens afterwards.
120
+ * Sources of received blocks, saved to be able punish them when processing
121
+ * happens afterwards.
122
122
* Set mapBlockSource[hash].second to false if the node should not be
123
123
* punished if the block is invalid.
124
124
*/
@@ -2861,11 +2861,12 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
2861
2861
// been run). This is handled below, so just treat this as
2862
2862
// though the block was successfully read, and rely on the
2863
2863
// handling in ProcessNewBlock to ensure the block index is
2864
- // updated, reject messages go out, etc.
2864
+ // updated, etc.
2865
2865
MarkBlockAsReceived (resp.blockhash ); // it is now an empty pointer
2866
2866
fBlockRead = true ;
2867
- // mapBlockSource is only used for sending reject messages and DoS scores,
2868
- // so the race between here and cs_main in ProcessNewBlock is fine.
2867
+ // mapBlockSource is used for potentially punishing peers and
2868
+ // updating which peers send us compact blocks, so the race
2869
+ // between here and cs_main in ProcessNewBlock is fine.
2869
2870
// BIP 152 permits peers to relay compact blocks after validating
2870
2871
// the header only; we should not punish peers if the block turns
2871
2872
// out to be invalid.
@@ -2937,8 +2938,9 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
2937
2938
// Also always process if we requested the block explicitly, as we may
2938
2939
// need it even though it is not a candidate for a new best tip.
2939
2940
forceProcessing |= MarkBlockAsReceived (hash);
2940
- // mapBlockSource is only used for sending reject messages and DoS scores,
2941
- // so the race between here and cs_main in ProcessNewBlock is fine.
2941
+ // mapBlockSource is only used for punishing peers and setting
2942
+ // which peers send us compact blocks, so the race between here and
2943
+ // cs_main in ProcessNewBlock is fine.
2942
2944
mapBlockSource.emplace (hash, std::make_pair (pfrom->GetId (), true ));
2943
2945
}
2944
2946
bool fNewBlock = false ;
0 commit comments