File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed 
app/protocol/flows/v5/blockrelay Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -679,7 +679,15 @@ func (flow *handleIBDFlow) syncMissingBlockBodies(highHash *externalapi.DomainHa
679679		progressReporter .reportProgress (len (hashesToRequest ), highestProcessedDAAScore )
680680	}
681681
682- 	return  flow .resolveVirtual (highestProcessedDAAScore )
682+ 	// We need to resolve virtual only if it wasn't updated while syncing block bodies 
683+ 	if  ! updateVirtual  {
684+ 		err  :=  flow .resolveVirtual (highestProcessedDAAScore )
685+ 		if  err  !=  nil  {
686+ 			return  err 
687+ 		}
688+ 	}
689+ 
690+ 	return  flow .OnNewBlockTemplate ()
683691}
684692
685693func  (flow  * handleIBDFlow ) banIfBlockIsHeaderOnly (block  * externalapi.DomainBlock ) error  {
@@ -711,9 +719,5 @@ func (flow *handleIBDFlow) resolveVirtual(estimatedVirtualDAAScoreTarget uint64)
711719	}
712720
713721	log .Infof ("Resolved virtual" )
714- 	err  =  flow .OnNewBlockTemplate ()
715- 	if  err  !=  nil  {
716- 		return  err 
717- 	}
718722	return  nil 
719723}
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments