scheduleValidators method

void scheduleValidators(
  1. List<ValidatorEntry> validators
)

BFT: schedules a coordinated validator set change that the next proposal announces. Throws when not BFT or malformed.

Implementation

void scheduleValidators(List<ValidatorEntry> validators) => _withU64s(
  _powers(validators),
  (pw) => _scoped([_publicKeys(validators)], (p) {
    final rc = _bc.lib
        .fn<_ScSchedC>('aviary_chain_schedule_validators')
        .asFunction<_ScSchedD>()(_h, p[0], pw, validators.length);
    if (rc != 1) throw StateError('chain: cannot schedule validators');
  }),
);