mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-02 12:24:29 +00:00
Payload builder version
This commit is contained in:
@@ -29,6 +29,9 @@ pub mod gloas {
|
||||
pub const BUILDER_INDEX_SELF_BUILD: u64 = u64::MAX;
|
||||
pub const BUILDER_INDEX_FLAG: u64 = 1 << 40;
|
||||
|
||||
/// Version for an execution payload builder.
|
||||
pub const PAYLOAD_BUILDER_VERSION: u8 = 0;
|
||||
|
||||
// Fork choice constants
|
||||
pub type PayloadStatus = u8;
|
||||
pub const PAYLOAD_STATUS_EMPTY: PayloadStatus = 0;
|
||||
|
||||
@@ -2061,6 +2061,7 @@ impl<E: EthSpec> BeaconState<E> {
|
||||
pub fn add_builder_to_registry(
|
||||
&mut self,
|
||||
pubkey: PublicKeyBytes,
|
||||
version: u8,
|
||||
withdrawal_credentials: Hash256,
|
||||
amount: u64,
|
||||
slot: Slot,
|
||||
@@ -2072,10 +2073,6 @@ impl<E: EthSpec> BeaconState<E> {
|
||||
let builder_index = self.get_index_for_new_builder()?;
|
||||
let builders = self.builders_mut()?;
|
||||
|
||||
let version = *withdrawal_credentials
|
||||
.as_slice()
|
||||
.first()
|
||||
.ok_or(BeaconStateError::WithdrawalCredentialMissingVersion)?;
|
||||
let execution_address = withdrawal_credentials
|
||||
.as_slice()
|
||||
.get(12..)
|
||||
|
||||
Reference in New Issue
Block a user