code: func LoadOrNewBlockchain(db dbm.DB, genesisDoc *genesis.GenesisDoc, logger *logging.Logger) (bool, *Blockchain, error) {
  	logger = logger.WithScope("LoadOrNewBlockchain")
  	logger.InfoMsg("Trying to load blockchain state from database",
  		"database_key", stateKey)
  	bc, err := loadBlockchain(db)
  	if err != nil {
  		return false, nil, fmt.Errorf("error loading blockchain state from database: %v", err)
  	}
  	if bc != nil {
  		dbHash := bc.genesisDoc.Hash()
  		argHash := genesisDoc.Hash()
  		if !bytes.Equal(dbHash, argHash) {
  			return false, nil, fmt.Errorf("GenesisDoc passed to LoadOrNewBlockchain has hash: 0x%X, which does not "+
  				"match the one found in database: 0x%X, database genesis:\n%v\npassed genesis:\n%v\n",
  				argHash, dbHash, bc.genesisDoc.JSONString(), genesisDoc.JSONString())
  		}
  		return true, bc, nil
  	}
  
  	logger.InfoMsg("No existing blockchain state found in database, making new blockchain")
  	return false, NewBlockchain(db, genesisDoc), nil
  }
docs: // LoadOrNewBlockchain returns true if state already exists