@lodestar/beacon-node
Version:
A Typescript implementation of the beacon chain
15 lines • 674 B
JavaScript
import { SeenAttesters } from "./seenAttesters.js";
// TODO abstract out the Seen* caches into an abstract abstract data structure
// that all the caches can extend since they share similar structure.
export class SeenBlockAttesters extends SeenAttesters {
addIndices(epoch, validatorIndexes) {
if (epoch < this.lowestPermissibleEpoch) {
throw Error(`EpochTooLow ${epoch} < ${this.lowestPermissibleEpoch}`);
}
const indexesByEpoch = this.validatorIndexesByEpoch.getOrDefault(epoch);
for (const index of validatorIndexes) {
indexesByEpoch.add(index);
}
}
}
//# sourceMappingURL=seenBlockAttesters.js.map