mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
Rename cursor functions (#787)
This commit is contained in:
@@ -180,7 +180,7 @@ impl<'a, DB: Database> DbTool<'a, DB> {
|
||||
|
||||
fn list_table<T: Table>(&mut self, start: usize, len: usize) -> Result<()> {
|
||||
let data = self.db.view(|tx| {
|
||||
let mut cursor = tx.cursor::<T>().expect("Was not able to obtain a cursor.");
|
||||
let mut cursor = tx.cursor_read::<T>().expect("Was not able to obtain a cursor.");
|
||||
|
||||
// TODO: Upstream this in the DB trait.
|
||||
let start_walker = cursor.current().transpose();
|
||||
|
||||
@@ -153,7 +153,7 @@ pub async fn run_test(path: PathBuf) -> eyre::Result<()> {
|
||||
tx.commit()?;
|
||||
|
||||
let storage = db.view(|tx| -> Result<_, DbError> {
|
||||
let mut cursor = tx.cursor_dup::<tables::PlainStorageState>()?;
|
||||
let mut cursor = tx.cursor_dup_read::<tables::PlainStorageState>()?;
|
||||
let walker = cursor.first()?.map(|first| cursor.walk(first.0)).transpose()?;
|
||||
Ok(walker.map(|mut walker| {
|
||||
let mut map: HashMap<Address, HashMap<U256, U256>> = HashMap::new();
|
||||
@@ -192,7 +192,7 @@ pub async fn run_test(path: PathBuf) -> eyre::Result<()> {
|
||||
info!("Post state is root: #{root:?}")
|
||||
}
|
||||
Some(RootOrState::State(state)) => db.view(|tx| -> eyre::Result<()> {
|
||||
let mut cursor = tx.cursor_dup::<tables::PlainStorageState>()?;
|
||||
let mut cursor = tx.cursor_dup_read::<tables::PlainStorageState>()?;
|
||||
let walker = cursor.first()?.map(|first| cursor.walk(first.0)).transpose()?;
|
||||
let storage = walker.map(|mut walker| {
|
||||
let mut map: HashMap<Address, HashMap<U256, U256>> = HashMap::new();
|
||||
|
||||
Reference in New Issue
Block a user