Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: relax on new head in validator #13352

Merged
merged 3 commits into from
Dec 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into matt/relax-pool-validate-fns
mattsse committed Dec 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 91cfa63c507377cc34fa53be56c4e3d68a3a30e4
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/optimism/node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ reth-chainspec.workspace = true
reth-db.workspace = true
reth-engine-local.workspace = true
reth-primitives.workspace = true
reth-primitives-traits.workspace = true
reth-payload-builder.workspace = true
reth-payload-util.workspace = true
reth-payload-validator.workspace = true
5 changes: 2 additions & 3 deletions crates/optimism/node/src/txpool.rs
Original file line number Diff line number Diff line change
@@ -3,8 +3,7 @@ use alloy_consensus::{BlockHeader, Transaction};
use alloy_eips::eip2718::Encodable2718;
use parking_lot::RwLock;
use reth_chainspec::ChainSpec;
use reth_node_api::BlockBody;
use reth_node_core::primitives::BlockHeader;
use reth_node_api::{Block, BlockBody};
use reth_optimism_evm::RethL1BlockInfo;
use reth_primitives::{GotExpected, InvalidTransactionError, SealedBlock, TransactionSigned};
use reth_provider::{BlockReaderIdExt, StateProviderFactory};
@@ -225,7 +224,7 @@ where

fn on_new_head_block<H, B>(&self, new_tip_block: &SealedBlock<H, B>)
where
H: BlockHeader,
H: reth_primitives_traits::BlockHeader,
B: BlockBody,
{
self.inner.on_new_head_block(new_tip_block);
6 changes: 5 additions & 1 deletion crates/transaction-pool/src/validate/mod.rs
Original file line number Diff line number Diff line change
@@ -243,7 +243,11 @@ where
}
}

fn on_new_head_block(&self, new_tip_block: &SealedBlock) {
fn on_new_head_block<H, Body>(&self, new_tip_block: &SealedBlock<H, Body>)
where
H: BlockHeader,
Body: BlockBody,
{
match self {
Self::Left(v) => v.on_new_head_block(new_tip_block),
Self::Right(v) => v.on_new_head_block(new_tip_block),
7 changes: 6 additions & 1 deletion crates/transaction-pool/src/validate/task.rs
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ use crate::{
use futures_util::{lock::Mutex, StreamExt};
use reth_chainspec::ChainSpec;
use reth_primitives::SealedBlock;
use reth_primitives_traits::{BlockBody, BlockHeader};
use reth_tasks::TaskSpawner;
use std::{future::Future, pin::Pin, sync::Arc};
use tokio::{
@@ -205,7 +206,11 @@ where
}
}

fn on_new_head_block(&self, new_tip_block: &SealedBlock) {
fn on_new_head_block<H, B>(&self, new_tip_block: &SealedBlock<H, B>)
where
H: BlockHeader,
B: BlockBody,
{
self.validator.on_new_head_block(new_tip_block)
}
}
You are viewing a condensed version of this merge commit. You can view the full changes here.