mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
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)
|
||
|
}
|