From e9a1603045ff648fe99e567bd18a9a9aac171c5f Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 14 Feb 2024 17:24:07 -0500 Subject: [PATCH] rename update method to commit_update --- bin/reth/src/commands/stage/drop.rs | 2 +- crates/storage/provider/src/providers/database/provider.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/reth/src/commands/stage/drop.rs b/bin/reth/src/commands/stage/drop.rs index 649b6770b3..5d68d117d7 100644 --- a/bin/reth/src/commands/stage/drop.rs +++ b/bin/reth/src/commands/stage/drop.rs @@ -62,7 +62,7 @@ impl Command { let provider_rw = DatabaseProviderRW::::with_tx(db.tx_mut()?, self.chain.clone(), &None)?; - provider_rw.update(|provider| { + provider_rw.commit_update(|provider| { match &self.stage { StageEnum::Bodies => { let tx = provider.tx_mut(); diff --git a/crates/storage/provider/src/providers/database/provider.rs b/crates/storage/provider/src/providers/database/provider.rs index 095109c0f1..f465f31d8e 100644 --- a/crates/storage/provider/src/providers/database/provider.rs +++ b/crates/storage/provider/src/providers/database/provider.rs @@ -89,7 +89,7 @@ where /// Takes a function and passes a read-write transaction into it, making sure it's committed at /// the end of the execution. - pub fn update(mut self, f: F) -> Result + pub fn commit_update(mut self, f: F) -> Result where F: FnOnce(&mut Self) -> T, {