history

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HistoryBackwards

func HistoryBackwards(url string, dsn string, stats bool) error

func HistoryForward

func HistoryForward(url string, dsn string, stats bool) error

Types

type Blockchain

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

func Open

func Open(name string) (b *Blockchain, err error)

Open creates or opens the database file and creates the tables if not yet done

func (*Blockchain) Begin

func (b *Blockchain) Begin() error

Begin starts a new transaction

func (*Blockchain) Commit

func (b *Blockchain) Commit() error

func (*Blockchain) InsertHeader

func (b *Blockchain) InsertHeader(h *types.Header, signers *redt.SignerData, numtxs uint64) error

func (*Blockchain) MaxBlockNumber

func (b *Blockchain) MaxBlockNumber() (int64, error)

func (*Blockchain) MinBlockNumber

func (b *Blockchain) MinBlockNumber() (int64, error)

func (*Blockchain) SignerDataForBlockNumberCached

func (b *Blockchain) SignerDataForBlockNumberCached(number int64) (*types.Header, *redt.SignerData, error)

GetBlockForNumber gets a block with specified number ither from the database or from the network It updates de database if the block is not there

func (*Blockchain) TimestampForNumber

func (b *Blockchain) TimestampForNumber(number int64) (int64, error)

Jump to

Keyboard shortcuts

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