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(test-utils): Make MockEthProvider generic over Transaction #13835

Open
0xOsiris opened this issue Jan 16, 2025 · 0 comments
Open

feat(test-utils): Make MockEthProvider generic over Transaction #13835

0xOsiris opened this issue Jan 16, 2025 · 0 comments
Labels
C-enhancement New feature or request S-needs-triage This issue needs to be labelled

Comments

@0xOsiris
Copy link
Contributor

Describe the feature

Right now the MockEthProvider fixes T to TransactionSigned making it unusable with OpSignedTransaction.

This could be generic over T:

#[derive(Debug, Clone)]
pub struct MockEthProvider<T = TransactionSigned> {
    /// Local block store
    pub blocks: Arc<Mutex<HashMap<B256, Block<T>>>>,
    /// Local header store
    pub headers: Arc<Mutex<HashMap<B256, Header>>>,
    /// Local account store
    pub accounts: Arc<Mutex<HashMap<Address, ExtendedAccount>>>,
    /// Local chain spec
    pub chain_spec: Arc<ChainSpec>,
    /// Local state roots
    pub state_roots: Arc<Mutex<Vec<B256>>>,
}

This would make the MockEthProvider more extensible to testing in an op-reth stack.

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request S-needs-triage This issue needs to be labelled
Projects
Status: Todo
Development

No branches or pull requests

1 participant