code: func (lc *LightChain) ResetWithGenesisBlock(genesis *types.Block) {
  	// Dump the entire block chain and purge the caches
  	lc.SetHead(0)
  
  	lc.chainmu.Lock()
  	defer lc.chainmu.Unlock()
  
  	// Prepare the genesis block and reinitialise the chain
  	rawdb.WriteTd(lc.chainDb, genesis.Hash(), genesis.NumberU64(), genesis.Difficulty())
  	rawdb.WriteBlock(lc.chainDb, genesis)
  
  	lc.genesisBlock = genesis
  	lc.hc.SetGenesis(lc.genesisBlock.Header())
  	lc.hc.SetCurrentHeader(lc.genesisBlock.Header())
  }
docs: // ResetWithGenesisBlock purges the entire blockchain, restoring it to the
  // specified genesis state.