-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(swingset): move crankbuffer/commit/abort inside kernelKeeper
The host application (which uses swingset as a library) is obligated to provide a "hostStorage" object, which is a trio of kvStore, streamStore, and snapStore. The host typically uses openLMDBSwingStore() to create this, and holds onto the "commit block" facet. Previously the kernelKeeper was built on top of the streamStore, the snapStore, and an "enhancedCrankBuffer", which was the host-provided key-value store plus an abortable/committable "crank buffer", plus some extra convenience methods. The kernel held the abort/commit facet. The kernel was responsible for extracting the raw kvStore from `hostStorage`, wrapping it, and passing the enhanced version into `makeKernelKeeper` along with the other two values. Instead, we now give the entire "hostStorage" object to `makeKernelKeeper`, and give the kernel keeper responsibility for doing the wrapping. When the kernel wants to commit or abort, it calls `kernelKeeper.abortCrank()` or `commitCrank()`. This simplifies the `makeKernelKeeper` construction and will provide a place for `commitCrank` to store a hash of kernel activity. refs #3442
- Loading branch information
Showing
6 changed files
with
72 additions
and
118 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
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.