db

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2024 License: LGPL-3.0 Imports: 3 Imported by: 2

Documentation

Overview

Copyright 2023 ChainSafe Systems (ON) SPDX-License-Identifier: LGPL-3.0-only

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBGetter

type DBGetter interface {
	Get(key []byte) (value []byte, err error)
}

DBGetter gets a value corresponding to the given key.

type DBPutter

type DBPutter interface {
	Put(key []byte, value []byte) error
}

DBPutter puts a value at the given key and returns an error.

type Database

type Database interface {
	DBGetter
	DBPutter
}

type MemoryDB

type MemoryDB struct {
	// contains filtered or unexported fields
}

func NewEmptyMemoryDB

func NewEmptyMemoryDB() *MemoryDB

func NewMemoryDBFromProof

func NewMemoryDBFromProof(encodedNodes [][]byte) (*MemoryDB, error)

func (*MemoryDB) Copy

func (mdb *MemoryDB) Copy() Database

func (*MemoryDB) Get

func (mdb *MemoryDB) Get(key []byte) ([]byte, error)

func (*MemoryDB) Put

func (mdb *MemoryDB) Put(key, value []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL