code: func (provider *Provider) Create(genesisBlock *common.Block) (ledger.PeerLedger, error) {
  	ledgerID, err := utils.GetChainIDFromBlock(genesisBlock)
  	if err != nil {
  		return nil, err
  	}
  	exists, err := provider.idStore.ledgerIDExists(ledgerID)
  	if err != nil {
  		return nil, err
  	}
  	if exists {
  		return nil, ErrLedgerIDExists
  	}
  	if err = provider.idStore.setUnderConstructionFlag(ledgerID); err != nil {
  		return nil, err
  	}
  	lgr, err := provider.openInternal(ledgerID)
  	if err != nil {
  		logger.Errorf("Error opening a new empty ledger. Unsetting under construction flag. Error: %+v", err)
  		panicOnErr(provider.runCleanup(ledgerID), "Error running cleanup for ledger id [%s]", ledgerID)
  		panicOnErr(provider.idStore.unsetUnderConstructionFlag(), "Error while unsetting under construction flag")
  		return nil, err
  	}
  	if err := lgr.CommitWithPvtData(&ledger.BlockAndPvtData{
  		Block: genesisBlock,
  	}); err != nil {
  		lgr.Close()
  		return nil, err
  	}
  	panicOnErr(provider.idStore.createLedgerID(ledgerID, genesisBlock), "Error while marking ledger as created")
  	return lgr, nil
  }
docs: // Create implements the corresponding method from interface ledger.PeerLedgerProvider
  // This functions sets a under construction flag before doing any thing related to ledger creation and
  // upon a successful ledger creation with the committed genesis block, removes the flag and add entry into
  // created ledgers list (atomically). If a crash happens in between, the 'recoverUnderConstructionLedger'
  // function is invoked before declaring the provider to be usable