rename update method to commit_update

This commit is contained in:
Dan Cline
2024-02-14 17:24:07 -05:00
parent bd5e86e124
commit e9a1603045
2 changed files with 2 additions and 2 deletions

View File

@@ -62,7 +62,7 @@ impl Command {
let provider_rw =
DatabaseProviderRW::<DatabaseEnv>::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();

View File

@@ -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<T, F>(mut self, f: F) -> Result<T, DatabaseError>
pub fn commit_update<T, F>(mut self, f: F) -> Result<T, DatabaseError>
where
F: FnOnce(&mut Self) -> T,
{