-
Notifications
You must be signed in to change notification settings - Fork 985
Implement DatabaseRef for State #2566
Copy link
Copy link
Closed
Description
I would suggest to have both traits (Database and DatabaseRef) implemented for State.
Currently State implements the Database trait, but not DatabaseRef. In case where e.g. an account is only read it seems more reasonable to just use the reference. This allows to reuse functions for the State that only accept DatabaseRef.
For State here:
revm/crates/database/src/states/state.rs
Lines 28 to 29 in 9f94a2a
| #[derive(Debug)] | |
| pub struct State<DB> { |
Implement the equivalent of Database for DatabaseRef:
revm/crates/database/src/states/state.rs
Line 228 in 9f94a2a
| impl<DB: Database> Database for State<DB> { |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels