Ignore whitelisting during IBD for unrequested blocks.
This commit is contained in:
parent
bfc30b3437
commit
6b1066fab4
1 changed files with 6 additions and 2 deletions
|
@ -4478,8 +4478,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
||||||
pfrom->AddInventoryKnown(inv);
|
pfrom->AddInventoryKnown(inv);
|
||||||
|
|
||||||
CValidationState state;
|
CValidationState state;
|
||||||
// Process all blocks from whitelisted peers, even if not requested.
|
// Process all blocks from whitelisted peers, even if not requested,
|
||||||
ProcessNewBlock(state, pfrom, &block, pfrom->fWhitelisted, NULL);
|
// unless we're still syncing with the network.
|
||||||
|
// Such an unrequested block may still be processed, subject to the
|
||||||
|
// conditions in AcceptBlock().
|
||||||
|
bool forceProcessing = pfrom->fWhitelisted && !IsInitialBlockDownload();
|
||||||
|
ProcessNewBlock(state, pfrom, &block, forceProcessing, NULL);
|
||||||
int nDoS;
|
int nDoS;
|
||||||
if (state.IsInvalid(nDoS)) {
|
if (state.IsInvalid(nDoS)) {
|
||||||
pfrom->PushMessage("reject", strCommand, state.GetRejectCode(),
|
pfrom->PushMessage("reject", strCommand, state.GetRejectCode(),
|
||||||
|
|
Loading…
Reference in a new issue