code: func (bc *BlockChain) insert(block *types.Block) {
  	// If the block is on a side chain or an unknown one, force other heads onto it too
  	updateHeads := rawdb.ReadCanonicalHash(bc.db, block.NumberU64()) != block.Hash()
  
  	// Add the block to the canonical chain number scheme and mark as the head
  	rawdb.WriteCanonicalHash(bc.db, block.Hash(), block.NumberU64())
  	rawdb.WriteHeadBlockHash(bc.db, block.Hash())
  
  	bc.currentBlock.Store(block)
  
  	// If the block is better than our head or is on a different chain, force update heads
  	if updateHeads {
  		bc.hc.SetCurrentHeader(block.Header())
  		rawdb.WriteHeadFastBlockHash(bc.db, block.Hash())
  
  		bc.currentFastBlock.Store(block)
  	}
  }
docs: // insert injects a new head block into the current block chain. This method
  // assumes that the block is indeed a true head. It will also reset the head
  // header and the head fast sync block to this very same block if they are older
  // or if they are on a different side chain.
  //
  // Note, this function assumes that the `mu` mutex is held!