db

package
v0.16.6 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 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
}

func New

func New(localDBDir string) (*DB, error)

func (*DB) AssignTask

func (p *DB) AssignTask(projectID uint64, taskID common.Hash, prover common.Address) error

func (*DB) BlockHead

func (p *DB) BlockHead() (uint64, common.Hash, error)

func (*DB) CreateTask

func (p *DB) CreateTask(projectID uint64, taskID common.Hash) error

func (*DB) DeleteTask

func (p *DB) DeleteTask(projectID uint64, taskID common.Hash) error

func (*DB) NBits

func (p *DB) NBits() (uint32, error)

func (*DB) Provers

func (p *DB) Provers() ([]common.Address, error)

func (*DB) ScannedBlockNumber

func (p *DB) ScannedBlockNumber() (uint64, error)

func (*DB) UnassignedTask

func (p *DB) UnassignedTask() (uint64, common.Hash, error)

func (*DB) UpsertBlockHead

func (p *DB) UpsertBlockHead(number uint64, hash common.Hash) error

func (*DB) UpsertNBits

func (p *DB) UpsertNBits(nbits uint32) error

func (*DB) UpsertProver

func (p *DB) UpsertProver(id uint64, operator common.Address) error

func (*DB) UpsertScannedBlockNumber

func (p *DB) UpsertScannedBlockNumber(number uint64) error

Jump to

Keyboard shortcuts

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