storages

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data added in v1.4.0

type Data interface {
	blockchain.Data
}

Data ...

It's used only for mock generating.

type MemoryStorage

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

MemoryStorage ...

func NewMemoryStorage added in v1.4.0

func NewMemoryStorage(blocks blockchain.BlockGroup) *MemoryStorage

NewMemoryStorage ...

func (*MemoryStorage) DeleteBlock added in v1.4.0

func (storage *MemoryStorage) DeleteBlock(block blockchain.Block) error

DeleteBlock ...

func (*MemoryStorage) LoadBlocks added in v1.3.2

func (storage *MemoryStorage) LoadBlocks(cursor interface{}, count int) (
	blocks blockchain.BlockGroup,
	nextCursor interface{},
	err error,
)

LoadBlocks ...

func (MemoryStorage) LoadLastBlock

func (storage MemoryStorage) LoadLastBlock() (blockchain.Block, error)

LoadLastBlock ...

func (*MemoryStorage) StoreBlock

func (storage *MemoryStorage) StoreBlock(block blockchain.Block) error

StoreBlock ...

Jump to

Keyboard shortcuts

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