code: func (s *store) Commit() error {
  	if !s.batchPending {
  		return &ErrIllegalCall{"No pending batch to commit"}
  	}
  	committingBlockNum := s.nextBlockNum()
  	logger.Debugf("Committing private data for block [%d]", committingBlockNum)
  	batch := leveldbhelper.NewUpdateBatch()
  	batch.Delete(pendingCommitKey)
  	batch.Put(lastCommittedBlkkey, encodeLastCommittedBlockVal(committingBlockNum))
  	if err := s.db.WriteBatch(batch, true); err != nil {
  		return err
  	}
  	s.batchPending = false
  	s.isEmpty = false
  	s.lastCommittedBlock = committingBlockNum
  	logger.Debugf("Committed private data for block [%d]", committingBlockNum)
  	s.performPurgeIfScheduled(committingBlockNum)
  	return nil
  }
docs: // Commit implements the function in the interface `Store`