headersdb

package
v4.9.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

DB is a bbolt key/value database.

func NewDB

func NewDB(filename string) (*DB, error)

NewDB creates/opens a new db.

func (*DB) Begin

func (db *DB) Begin() (headers.DBTxInterface, error)

Begin implements headers.DBInterface.

type Tx

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

Tx implements headers.DBTxInterface.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit implements headers.DBTxInterface.

func (*Tx) HeaderByHeight

func (tx *Tx) HeaderByHeight(height int) (*wire.BlockHeader, error)

HeaderByHeight implements headers.DBTxInterface.

func (*Tx) PutHeader

func (tx *Tx) PutHeader(tip int, header *wire.BlockHeader) error

PutHeader implements headers.DBTxInterface.

func (*Tx) PutTip

func (tx *Tx) PutTip(tip int) error

PutTip implements headers.DBTxInterface.

func (*Tx) Rollback

func (tx *Tx) Rollback()

Rollback implements headers.DBTxInterface.

func (*Tx) Tip

func (tx *Tx) Tip() (int, error)

Tip implements headers.DBTxInterface.

Jump to

Keyboard shortcuts

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