-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test runtime: use Rc<MemoryBlockstore>. (#599)
With the real FvmRuntime, we expect that cloning the &Blockstore returned by Runtime#store() would simply clone the reference. This is because inside the FVM, blockstore calls proxy out to FVM syscalls; the proxy itself holds no state, and cloning it is unimportant. However, in the MockRuntime, we were using a physical MemoryBlockstore. Cloning it would return a new physical copy, thus breaking the expectation. This commit makes MockRuntime use an Rc<MemoryBlockstore>, so all clones will point to the same MemoryBlockstore, thus preserving the expectation. Co-authored-by: Raúl Kripalani <raul@protocol.ai>
- Loading branch information
Showing
5 changed files
with
9 additions
and
8 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