mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 09:08:05 -05:00
Change terminal_block_number type to U64 (#677)
This commit is contained in:
@@ -290,7 +290,7 @@ impl<Client: HeaderProvider + BlockProvider + StateProvider> ConsensusEngine
|
||||
}
|
||||
|
||||
// Attempt to look up terminal block hash
|
||||
let local_hash = self.client.block_hash(terminal_block_number.into())?;
|
||||
let local_hash = self.client.block_hash(terminal_block_number.as_u64().into())?;
|
||||
|
||||
// Transition configuration exchange is successful if block hashes match
|
||||
match local_hash {
|
||||
@@ -665,7 +665,7 @@ mod tests {
|
||||
let transition_config = TransitionConfiguration {
|
||||
terminal_total_difficulty: config.merge_terminal_total_difficulty.into(),
|
||||
terminal_block_hash: consensus_terminal_block.hash(),
|
||||
terminal_block_number,
|
||||
terminal_block_number: terminal_block_number.into(),
|
||||
};
|
||||
|
||||
// Unknown block number
|
||||
@@ -724,7 +724,7 @@ mod tests {
|
||||
let transition_config = TransitionConfiguration {
|
||||
terminal_total_difficulty: config.merge_terminal_total_difficulty.into(),
|
||||
terminal_block_hash: terminal_block.hash(),
|
||||
terminal_block_number,
|
||||
terminal_block_number: terminal_block_number.into(),
|
||||
};
|
||||
|
||||
client.add_block(terminal_block.hash(), terminal_block.clone().unseal());
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use bytes::BytesMut;
|
||||
use reth_primitives::{Address, BlockNumber, Bloom, Bytes, SealedBlock, H256, H64, U256, U64};
|
||||
use reth_primitives::{Address, Bloom, Bytes, SealedBlock, H256, H64, U256, U64};
|
||||
use reth_rlp::Encodable;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -147,7 +147,7 @@ pub struct TransitionConfiguration {
|
||||
/// Maps on TERMINAL_BLOCK_HASH parameter of EIP-3675
|
||||
pub terminal_block_hash: H256,
|
||||
/// Maps on TERMINAL_BLOCK_NUMBER parameter of EIP-3675
|
||||
pub terminal_block_number: BlockNumber,
|
||||
pub terminal_block_number: U64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user