mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
6e9faa3618
* Add epoch precompute methods * Split into part 1 for better review * Update epoch_precompute_test.go * Preston's feedback * Skip if the valiator is not eligible * Add regression test for non eligible Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
12 lines
336 B
Go
12 lines
336 B
Go
package altair
|
|
|
|
// HasValidatorFlag returns true if the flag at position has set.
|
|
func HasValidatorFlag(flag, flagPosition uint8) bool {
|
|
return ((flag >> flagPosition) & 1) == 1
|
|
}
|
|
|
|
// AddValidatorFlag adds new validator flag to existing one.
|
|
func AddValidatorFlag(flag, flagPosition uint8) uint8 {
|
|
return flag | (1 << flagPosition)
|
|
}
|