code: func (s *Store) syncPvtdataStoreWithBlockStore() error {
  	var pendingPvtbatch bool
  	var err error
  	if pendingPvtbatch, err = s.pvtdataStore.HasPendingBatch(); err != nil {
  		return err
  	}
  	if !pendingPvtbatch {
  		return nil
  	}
  	var bcInfo *common.BlockchainInfo
  	var pvtdataStoreHt uint64
  
  	if bcInfo, err = s.GetBlockchainInfo(); err != nil {
  		return err
  	}
  	if pvtdataStoreHt, err = s.pvtdataStore.LastCommittedBlockHeight(); err != nil {
  		return err
  	}
  
  	if bcInfo.Height == pvtdataStoreHt {
  		return s.pvtdataStore.Rollback()
  	}
  
  	if bcInfo.Height == pvtdataStoreHt+1 {
  		return s.pvtdataStore.Commit()
  	}
  
  	return errors.Errorf("This is not expected. blockStoreHeight=%d, pvtdataStoreHeight=%d", bcInfo.Height, pvtdataStoreHt)
  }
docs: // syncPvtdataStoreWithBlockStore checks whether the block storage and pvt data store are in sync
  // this is called when the store instance is constructed and handed over for the use.
  // this check whether there is a pending batch (possibly from a previous system crash)
  // of pvt data that was not committed. If a pending batch exists, the check is made
  // whether the associated block was successfully committed in the block storage (before the crash)
  // or not. If the block was committed, the private data batch is committed
  // otherwise, the pvt data batch is rolledback