db

package
v0.0.0-...-bc5e9de Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateGenesisBlock

func GenerateGenesisBlock()

Types

type DB

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

func New

func New(db *pgx.Conn) *DB

New returns a new DB.

func (*DB) AddBlock

func (d *DB) AddBlock(ctx context.Context, block block.Block) error

AddBlock adds a block to the database.

func (*DB) LastBlock

func (d *DB) LastBlock() block.Block

LastBlock returns the last block in the database.

Jump to

Keyboard shortcuts

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