mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-03 07:45:18 +00:00
2838191c4f
* partial commit * fixes * remove converters too * revert changes on nimbus_verified_proxy * revert changes in converter * revert changes(re-xport) in rpc_types * update copyright year * replace types in other binaries * chain config bug * fix rebase conflict imcomplete buffer * fix more rebase buffers * remove ditto types and converters * fix the tests * update copyright year
42 lines
1.3 KiB
Nim
42 lines
1.3 KiB
Nim
# nimbus-eth1
|
|
# Copyright (c) 2023-2024 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.
|
|
|
|
## Kvt DB -- structural data types
|
|
## ===============================
|
|
##
|
|
{.push raises: [].}
|
|
|
|
import
|
|
std/tables
|
|
|
|
type
|
|
LayerRef* = ref LayerObj
|
|
LayerObj* = object
|
|
## Kvt database layer structures. Any layer holds the full
|
|
## change relative to the backend.
|
|
sTab*: Table[seq[byte],seq[byte]] ## Structural data table
|
|
txUid*: uint ## Transaction identifier if positive
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# Public helpers (misc)
|
|
# ------------------------------------------------------------------------------
|
|
|
|
func init*(T: type LayerRef): T =
|
|
## Constructor, returns empty layer
|
|
T()
|
|
|
|
func dup*(ly: LayerRef): LayerRef =
|
|
## Duplicate/copy
|
|
LayerRef(sTab: ly.sTab)
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# End
|
|
# ------------------------------------------------------------------------------
|