mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-10 12:26:02 +00:00
71c91e2280
* Better error handling why: Bail out on some error as early as possible before any changes. * Implement `fetch()` as opposite of `merge()` rationale: In the `Aristo` realm, the action named `fetch()` and `merge()` indicate leaf value related actions on the MPT, while actions `get()` and `put()` handle vertex or hash key related operations that constitute the MPT. * Re-factor `merge()` prototypes why: The most used variant of `merge()` should have the simplest prototype. * Persistent DB constructor needs to import `aristo/aristo_init/persistent` why: Most applications use memory DB anyway. This avoids linking `-lrocksdb` or any other back end libraries by default. * Re-factor transaction module why: Got the paradigm wrong. The transaction descriptor did replace the database one but should be handled separately.
29 lines
894 B
Nim
29 lines
894 B
Nim
# Nimbus
|
|
# Copyright (c) 2018 Status Research & Development GmbH
|
|
# Licensed under either of
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
|
# http://www.apache.org/licenses/LICENSE-2.0)
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
|
|
# http://opensource.org/licenses/MIT)
|
|
# at your option. This file may not be copied, modified, or distributed except
|
|
# according to those terms.
|
|
|
|
## Core database replacement wrapper object
|
|
## ========================================
|
|
##
|
|
## See `core_db/README.md` for implementation details
|
|
##
|
|
## This module provides a memory datanase only. For providing a persistent
|
|
## constructor, import `db/code_db/persistent` though avoiding to
|
|
## unnecessarily link to the persistent backend library (e.g. `rocksdb`)
|
|
## when a memory only database is used.
|
|
##
|
|
{.push raises: [].}
|
|
|
|
import
|
|
./core_db/memory_only
|
|
export
|
|
memory_only
|
|
|
|
# End
|