mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-22 23:38:24 +00:00
Implement Gloas withdrawals and refactor (#8692)
Co-Authored-By: Michael Sproul <michael@sigmaprime.io> Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
use types::{builder::BuilderIndex, consts::gloas::BUILDER_INDEX_FLAG};
|
||||
|
||||
pub fn is_builder_index(validator_index: u64) -> bool {
|
||||
validator_index & BUILDER_INDEX_FLAG != 0
|
||||
}
|
||||
|
||||
pub fn convert_builder_index_to_validator_index(builder_index: BuilderIndex) -> u64 {
|
||||
builder_index | BUILDER_INDEX_FLAG
|
||||
}
|
||||
|
||||
pub fn convert_validator_index_to_builder_index(validator_index: u64) -> BuilderIndex {
|
||||
validator_index & !BUILDER_INDEX_FLAG
|
||||
}
|
||||
Reference in New Issue
Block a user