merge conflicts

This commit is contained in:
Eitan Seri-Levi
2026-04-28 01:06:02 +02:00
parent e8ec40a233
commit d86fd5bb6f
4 changed files with 6 additions and 9 deletions

View File

@@ -1177,8 +1177,8 @@ fn make_genesis_block<E: EthSpec>(
genesis_state: &mut BeaconState<E>,
spec: &ChainSpec,
) -> Result<SignedBeaconBlock<E>, String> {
let mut block = genesis_block(genesis_state, spec)
.map_err(|e| format!("Error building genesis block: {:?}", e))?;
let mut block =
genesis_block(spec).map_err(|e| format!("Error building genesis block: {:?}", e))?;
*block.state_root_mut() = genesis_state
.update_tree_hash_cache()

View File

@@ -65,7 +65,7 @@ impl TestContext {
root: Hash256::ZERO,
};
let mut block = genesis_block(&state, &spec).expect("should build genesis block");
let mut block = genesis_block(&spec).expect("should build genesis block");
*block.state_root_mut() = state
.update_tree_hash_cache()
.expect("should hash genesis state");

View File

@@ -113,7 +113,7 @@ impl TestContext {
)
.expect("should register inactive builder");
let mut block = genesis_block(&state, &spec).expect("should build genesis block");
let mut block = genesis_block(&spec).expect("should build genesis block");
*block.state_root_mut() = state
.update_tree_hash_cache()
.expect("should hash genesis state");

View File

@@ -184,15 +184,12 @@ pub fn initialize_beacon_state_from_eth1<E: EthSpec>(
Ok(state)
}
/// Create an unsigned genesis `BeaconBlock` matching the genesis state.
/// Create an unsigned genesis `BeaconBlock`.
///
/// Per spec, the genesis block body is empty (all default fields).
/// `state.latest_block_header.body_root` is set from `BeaconBlock::empty()`,
/// so this function must return the same empty block to keep roots consistent.
pub fn genesis_block<E: EthSpec>(
_genesis_state: &BeaconState<E>,
spec: &ChainSpec,
) -> Result<BeaconBlock<E>, BeaconStateError> {
pub fn genesis_block<E: EthSpec>(spec: &ChainSpec) -> Result<BeaconBlock<E>, BeaconStateError> {
Ok(BeaconBlock::empty(spec))
}