code: func (b *blockManager) findPreviousHeaderCheckpoint(height int32) *chaincfg.Checkpoint {
  	// Start with the genesis block - earliest checkpoint to which our code
  	// will want to reset
  	prevCheckpoint := &chaincfg.Checkpoint{
  		Height: 0,
  		Hash:   b.server.chainParams.GenesisHash,
  	}
  
  	// Find the latest checkpoint lower than height or return genesis block
  	// if there are none.
  	checkpoints := b.server.chainParams.Checkpoints
  	for i := 0; i < len(checkpoints); i++ {
  		if height <= checkpoints[i].Height {
  			break
  		}
  		prevCheckpoint = &checkpoints[i]
  	}
  
  	return prevCheckpoint
  }
docs: // findPreviousHeaderCheckpoint returns the last checkpoint before the passed
  // height. It returns a checkpoint matching the genesis block when the height
  // is earlier than the first checkpoint or there are no checkpoints for the
  // current network. This is used for resetting state when a malicious peer
  // sends us headers that don't lead up to a known checkpoint.