Skip to content

Commit

Permalink
persistence: fix missed saving of the stash on secret seal creation
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Jul 10, 2024
1 parent 4135549 commit c2f8347
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/persistence/stash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -592,9 +592,14 @@ impl<P: StashProvider> Stash<P> {
&mut self,
seal: XChain<GraphSeal>,
) -> Result<bool, StashError<P>> {
self.provider
self.begin_transaction()?;
let seal = self
.provider
.add_secret_seal(seal)
.map_err(StashError::WriteProvider)
.inspect_err(|_| self.rollback_transaction())
.map_err(StashError::WriteProvider)?;
self.commit_transaction()?;
Ok(seal)
}
}

Expand Down

0 comments on commit c2f8347

Please sign in to comment.