mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor: extract optimism receipts hashing logic to reth-optimism-consensus (#11230)
This commit is contained in:
@ -35,6 +35,9 @@ alloy-primitives.workspace = true
|
||||
revm-primitives.workspace = true
|
||||
alloy-rpc-types-engine.workspace = true
|
||||
|
||||
# optimism
|
||||
reth-optimism-consensus = { workspace = true, optional = true }
|
||||
|
||||
# async
|
||||
futures-util.workspace = true
|
||||
tokio = { workspace = true, features = ["sync", "time"] }
|
||||
@ -42,4 +45,4 @@ tokio-stream.workspace = true
|
||||
tracing.workspace = true
|
||||
|
||||
[features]
|
||||
optimism = ["reth-provider/optimism"]
|
||||
optimism = ["reth-provider/optimism", "reth-optimism-consensus"]
|
||||
|
||||
@ -419,7 +419,13 @@ impl StorageInner {
|
||||
header.receipts_root = {
|
||||
#[cfg(feature = "optimism")]
|
||||
let receipts_root = execution_outcome
|
||||
.optimism_receipts_root_slow(header.number, &chain_spec, header.timestamp)
|
||||
.generic_receipts_root_slow(header.number, |receipts| {
|
||||
reth_optimism_consensus::calculate_receipt_root_no_memo_optimism(
|
||||
receipts,
|
||||
&chain_spec,
|
||||
header.timestamp,
|
||||
)
|
||||
})
|
||||
.expect("Receipts is present");
|
||||
|
||||
#[cfg(not(feature = "optimism"))]
|
||||
|
||||
Reference in New Issue
Block a user