Rename cursor functions (#787)

This commit is contained in:
LambdaClass
2023-01-10 16:08:30 -03:00
committed by GitHub
parent e5e74cbc02
commit 3bd1458df6
17 changed files with 90 additions and 90 deletions

View File

@@ -26,7 +26,7 @@ pub fn init_db<P: AsRef<Path>>(path: P) -> eyre::Result<Env<WriteMap>> {
#[allow(clippy::field_reassign_with_default)]
pub fn init_genesis<DB: Database>(db: Arc<DB>, genesis: Genesis) -> Result<H256, reth_db::Error> {
let tx = db.tx()?;
if let Some((_, hash)) = tx.cursor::<tables::CanonicalHeaders>()?.first()? {
if let Some((_, hash)) = tx.cursor_read::<tables::CanonicalHeaders>()?.first()? {
debug!("Genesis already written, skipping.");
return Ok(hash)
}