primitives: use SealedHeader::seal (#12507)

This commit is contained in:
Thomas Coratger
2024-11-13 13:41:56 +01:00
committed by GitHub
parent 527767cc34
commit 9313737dbb
32 changed files with 108 additions and 277 deletions

View File

@ -1,4 +1,4 @@
use alloy_primitives::{Address, Sealable, B256};
use alloy_primitives::{Address, B256};
use alloy_rpc_types_eth::{Filter, FilteredParams};
use reth_chainspec::ChainSpecBuilder;
use reth_db::{open_db_read_only, DatabaseEnv};
@ -63,9 +63,7 @@ fn header_provider_example<T: HeaderProvider>(provider: T, number: u64) -> eyre:
// We can convert a header to a sealed header which contains the hash w/o needing to re-compute
// it every time.
let sealed = header.seal_slow();
let (header, seal) = sealed.into_parts();
let sealed_header = SealedHeader::new(header, seal);
let sealed_header = SealedHeader::seal(header);
// Can also query the header by hash!
let header_by_hash =