coreutils

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 6 Imported by: 1

README

Sia Core

GoDoc

This repo contains implementations of core Sia components, such as a P2P syncing/relay node, database-backed blockchain state manager, single-address wallet, and more. It is intended for use by Sia node implementations like walletd, renterd, and hostd.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindBlockNonce added in v0.0.2

func FindBlockNonce(cs consensus.State, b *types.Block, timeout time.Duration) bool

FindBlockNonce attempts to find a nonce for b that meets the PoW target.

func MineBlock added in v0.0.2

func MineBlock(cm *chain.Manager, addr types.Address, timeout time.Duration) (types.Block, bool)

MineBlock constructs a block from the provided address and the transactions in the txpool, and attempts to find a nonce for it that meets the PoW target.

Types

type BoltChainDB

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

BoltChainDB implements chain.DB with a BoltDB database.

func NewBoltChainDB

func NewBoltChainDB(db *bbolt.DB) *BoltChainDB

NewBoltChainDB creates a new BoltChainDB.

func OpenBoltChainDB

func OpenBoltChainDB(path string) (*BoltChainDB, error)

OpenBoltChainDB opens a BoltDB database.

func (*BoltChainDB) Bucket

func (db *BoltChainDB) Bucket(name []byte) chain.DBBucket

Bucket implements chain.DB.

func (*BoltChainDB) Cancel

func (db *BoltChainDB) Cancel()

Cancel implements chain.DB.

func (*BoltChainDB) Close

func (db *BoltChainDB) Close() error

Close closes the BoltDB database.

func (*BoltChainDB) CreateBucket

func (db *BoltChainDB) CreateBucket(name []byte) (chain.DBBucket, error)

CreateBucket implements chain.DB.

func (*BoltChainDB) Flush

func (db *BoltChainDB) Flush() error

Flush implements chain.DB.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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