-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix transaction implementation in
LogState::validate
. (#243)
This PR removes the incorrect transaction implementation for `LogState::validate`. Now `validate` takes ownership of `self` and returns `Result<Self, ValidationError>`. This means that callers that expect to keep the log state following an invalid log entry must clone the state prior to validation. As the in-memory data store is the only store that persists the log state in memory, it now clones the state before validation and updates the log state upon successful validation. For the postgres data store, the log state was loaded from the database and is discarded on error, so no clone is necessary. Fixes #242.
- Loading branch information
1 parent
c46ec79
commit cf62106
Showing
9 changed files
with
101 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.