canCommit method

bool canCommit(
  1. int prepares,
  2. int commits
)

Implementation

bool canCommit(int prepares, int commits) {
  return prepares >= prepareThreshold() && commits >= commitThreshold();
}