Documentation ¶
Index ¶
- func HistoryBackwards(url string, dsn string, stats bool) error
- func HistoryForward(url string, dsn string, stats bool) error
- type Blockchain
- func (b *Blockchain) Begin() error
- func (b *Blockchain) Commit() error
- func (b *Blockchain) InsertHeader(h *types.Header, signers *redt.SignerData, numtxs uint64) error
- func (b *Blockchain) MaxBlockNumber() (int64, error)
- func (b *Blockchain) MinBlockNumber() (int64, error)
- func (b *Blockchain) SignerDataForBlockNumberCached(number int64) (*types.Header, *redt.SignerData, error)
- func (b *Blockchain) TimestampForNumber(number int64) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) 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)
Click to show internal directories.
Click to hide internal directories.