code: func CreateLedger(genesisBlock *common.Block) (ledger.PeerLedger, error) {
  	lock.Lock()
  	defer lock.Unlock()
  	if !initialized {
  		return nil, ErrLedgerMgmtNotInitialized
  	}
  	id, err := utils.GetChainIDFromBlock(genesisBlock)
  	if err != nil {
  		return nil, err
  	}
  
  	logger.Infof("Creating ledger [%s] with genesis block", id)
  	l, err := ledgerProvider.Create(genesisBlock)
  	if err != nil {
  		return nil, err
  	}
  	l = wrapLedger(id, l)
  	openedLedgers[id] = l
  	logger.Infof("Created ledger [%s] with genesis block", id)
  	return l, nil
  }
docs: // CreateLedger creates a new ledger with the given genesis block.
  // This function guarantees that the creation of ledger and committing the genesis block would an atomic action
  // The chain id retrieved from the genesis block is treated as a ledger id