headersdb

package
v4.11.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: Apache-2.0 Imports: 5 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) Flush

func (db *DB) Flush() error

Flush implements headers.DBInterface.

func (*DB) HeaderByHeight

func (db *DB) HeaderByHeight(height int) (*wire.BlockHeader, error)

HeaderByHeight implements headers.DBInterface.

func (*DB) PutHeader

func (db *DB) PutHeader(height int, header *wire.BlockHeader) error

PutHeader implements headers.DBInterface.

func (*DB) RevertTo

func (db *DB) RevertTo(tip int) error

RevertTo implements headers.DBInterface.

func (*DB) Tip

func (db *DB) Tip() (int, error)

Tip implements headers.DBInterface.

Jump to

Keyboard shortcuts

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