mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-02 16:21:42 +00:00
Use Uint256 for base_fee_per_gas
This commit is contained in:
@@ -71,7 +71,7 @@ pub fn initialize_beacon_state_from_eth1<T: EthSpec>(
|
||||
timestamp: eth1_timestamp,
|
||||
random: eth1_block_hash,
|
||||
gas_limit: GENESIS_GAS_LIMIT,
|
||||
base_fee_per_gas: GENESIS_BASE_FEE_PER_GAS,
|
||||
base_fee_per_gas: Uint256::from_little_endian(&GENESIS_BASE_FEE_PER_GAS),
|
||||
..ExecutionPayloadHeader::default()
|
||||
};
|
||||
}
|
||||
|
||||
@@ -21,11 +21,10 @@ pub mod altair {
|
||||
}
|
||||
|
||||
pub mod merge_testing {
|
||||
use ethereum_types::H256;
|
||||
pub const GENESIS_GAS_LIMIT: u64 = 30_000_000;
|
||||
pub const GENESIS_BASE_FEE_PER_GAS: H256 = H256([
|
||||
pub const GENESIS_BASE_FEE_PER_GAS: [u8; 32] = [
|
||||
0x00, 0xca, 0x9a, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
]);
|
||||
];
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ pub struct ExecutionPayload<T: EthSpec> {
|
||||
pub timestamp: u64,
|
||||
#[serde(with = "ssz_types::serde_utils::hex_var_list")]
|
||||
pub extra_data: VariableList<u8, T::MaxExtraDataBytes>,
|
||||
pub base_fee_per_gas: Hash256,
|
||||
pub base_fee_per_gas: Uint256,
|
||||
pub block_hash: Hash256,
|
||||
#[test_random(default)]
|
||||
pub transactions: VariableList<Transaction<T>, T::MaxTransactionsPerPayload>,
|
||||
@@ -80,7 +80,7 @@ impl<T: EthSpec> ExecutionPayload<T> {
|
||||
gas_used: 0,
|
||||
timestamp: 0,
|
||||
extra_data: VariableList::empty(),
|
||||
base_fee_per_gas: Hash256::zero(),
|
||||
base_fee_per_gas: Uint256::zero(),
|
||||
block_hash: Hash256::zero(),
|
||||
transactions: VariableList::empty(),
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ pub struct ExecutionPayloadHeader<T: EthSpec> {
|
||||
pub timestamp: u64,
|
||||
#[serde(with = "ssz_types::serde_utils::hex_var_list")]
|
||||
pub extra_data: VariableList<u8, T::MaxExtraDataBytes>,
|
||||
pub base_fee_per_gas: Hash256,
|
||||
pub base_fee_per_gas: Uint256,
|
||||
pub block_hash: Hash256,
|
||||
pub transactions_root: Hash256,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user