isAboveValidity function

bool isAboveValidity(
  1. int size,
  2. int nShards
)

Whether size failures exceed the validity threshold (> f).

When true the operation should be aborted because too many nodes have failed.

Mirrors TS SDK isAboveValidity(size, nShards).

Implementation

bool isAboveValidity(int size, int nShards) {
  return size > getMaxFaultyNodes(nShards);
}