Key Value Storage
Key Value Storage package allows our full-node to store and lookup data with several engines.
Interface and implementation
DatabaseEngine is the common interface which will be shared among its implementations, this approach will allow us to support new storage engine in the future without sacrifice the consistency.
LevelDbEngine: A implementation of DatabaseEngine for LevelDB
MemoryEngine: A implementation of DatabaseEngine for Memory
KeyValueStorage: A implementation of DatabaseEngine, It's also a wrapper of LevelDbEngine and MemoryEngine
KeyValueStorage will wrap the engine and provide the same interface.
Option modifier
This mechanism allows us to modify the options much more flexible
Call Option
We allow user to set the option for the next call
Last updated