code: func (f *lightFetcher) checkSyncedHeaders(p *peer) {
  	fp := f.peers[p]
  	if fp == nil {
  		p.Log().Debug("Unknown peer to check sync headers")
  		return
  	}
  
  	n := fp.lastAnnounced
  	var td *big.Int
  
  	var h *types.Header
  	if f.pm.isULCEnabled() {
  		var unapprovedHashes []common.Hash
  		// Overwrite last announced for ULC mode
  		h, unapprovedHashes = f.lastTrustedTreeNode(p)
  		//rollback untrusted blocks
  		f.chain.Rollback(unapprovedHashes)
  		//overwrite to last trusted
  		n = fp.nodeByHash[h.Hash()]
  	}
  
  	//find last valid block
  	for n != nil {
  		if td = f.chain.GetTd(n.hash, n.number); td != nil {
  			break
  		}
  		n = n.parent
  	}
  
  	// Now n is the latest downloaded/approved header after syncing
  	if n == nil {
  		p.Log().Debug("Synchronisation failed")
  		go f.pm.removePeer(p.id)
  		return
  	}
  	header := f.chain.GetHeader(n.hash, n.number)
  	f.newHeaders([]*types.Header{header}, []*big.Int{td})
  }
docs: // checkSyncedHeaders updates peer's block tree after synchronisation by marking
  // downloaded headers as known. If none of the announced headers are found after
  // syncing, the peer is dropped.