pub fn attester_shuffling_decision_root(
        &self,
        block_root: Hash256,
        relative_epoch: RelativeEpoch,
    ) -> Result<Hash256, Error> {
        let decision_slot = self.attester_shuffling_decision_slot(relative_epoch);
        if self.slot == decision_slot {
            Ok(block_root)
        } else {
            self.get_block_root(decision_slot).map(|root| *root)
        }
    }
/// Returns the block root which decided the attester shuffling for the given `relative_epoch`.
/// This root can be used to key that attester shuffling.
///
/// ## Notes
///
/// The `block_root` covers the one-off scenario where the genesis block decides its own
/// shuffling. It should be set to the latest block applied to `self` or the genesis block root.
Returns the block root which decided the attester shuffling for the given `relative_epoch`.
This root can be used to key that attester shuffling.
Returns the block root which decided the attester shuffling for the given ` relative_epoch ` . This root can be used to key that attester shuffling .
pub fn attester_shuffling_decision_root(
        &self,
        block_root: Hash256,
        relative_epoch: RelativeEpoch,
    ) -> Result<Hash256, Error> {
        let decision_slot = self.attester_shuffling_decision_slot(relative_epoch);
        if self.slot == decision_slot {
            Ok(block_root)
        } else {
            self.get_block_root(decision_slot).map(|root| *root)
        }
    }
pub fn attester_shuffling_decision_root ( & self , block_root : Hash256 , relative_epoch : RelativeEpoch , ) -> Result < Hash256 , Error > { let decision_slot = self . attester_shuffling_decision_slot ( relative_epoch ) ; if self . slot == decision_slot { Ok ( block_root ) } else { self . get_block_root ( decision_slot ) . map ( | root | * root ) } }
Returns the block root which decided the attester shuffling for the given `relative_epoch`.
Returns the block root which decided the attester shuffling for the given ` relative_epoch ` .
&self
block_root
Hash256
relative_epoch
RelativeEpoch
notes
The `block_root` covers the one-off scenario where the genesis block decides its own
shuffling. It should be set to the latest block applied to `self` or the genesis block root.
The ` block_root ` covers the one - off scenario where the genesis block decides its own shuffling . It should be set to the latest block applied to ` self ` or the genesis block root .