Skip to content

Commit

Permalink
feat:addd validator helper
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Kai <[email protected]>
  • Loading branch information
GrapeBaBa committed Oct 4, 2024
1 parent 6eca36e commit 56ebf9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/consensus/helpers/validator.zig
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub fn isSlashableValidator(validator: *const consensus.Validator, epoch: primit
/// Return the sequence of active validator indices at ``epoch``.
/// """
/// return [ValidatorIndex(i) for i, v in enumerate(state.validators) if is_active_validator(v, epoch)]
// Note: The caller is responsible for freeing the returned slice using the same allocator.
/// Note: The caller is responsible for freeing the returned slice using the same allocator.
pub fn getActiveValidatorIndices(state: *const consensus.BeaconState, epoch: primitives.Epoch, allocator: Allocator) ![]primitives.ValidatorIndex {
var active_validators = std.ArrayList(primitives.ValidatorIndex).init(allocator);
defer active_validators.deinit();
Expand Down

0 comments on commit 56ebf9a

Please sign in to comment.