shard

package
v0.3.14 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: ISC Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chain

func Chain(shardID uint32, params *chaincfg.Params, beaconGenesis *wire.BeaconHeader, tx *wire.MsgTx) *shardChain

Types

type BeaconBlockProvider

type BeaconBlockProvider interface {
	BlockTemplate(useCoinbaseValue bool, burnReward int) (mining.BlockTemplate, error)
	ShardCount() (uint32, error)
}

type BlockGenerator

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

func NewChainBlockGenerator

func NewChainBlockGenerator(beacon BeaconBlockProvider) *BlockGenerator

func (*BlockGenerator) AcceptBlock

func (c *BlockGenerator) AcceptBlock(wire.BlockHeader) error

func (*BlockGenerator) CalcBlockSubsidy

func (c *BlockGenerator) CalcBlockSubsidy(height int32, header wire.BlockHeader) int64

func (*BlockGenerator) NewBlockHeader

func (c *BlockGenerator) NewBlockHeader(_ wire.BVersion, prevHash, merkleRootHash chainhash.Hash,
	timestamp time.Time, bits, nonce uint32, burnReward int) (wire.BlockHeader, error)

func (*BlockGenerator) ValidateBlockHeader

func (c *BlockGenerator) ValidateBlockHeader(header wire.BlockHeader) error

func (*BlockGenerator) ValidateCoinbaseTx

func (c *BlockGenerator) ValidateCoinbaseTx(block *wire.MsgBlock, height int32) error

Jump to

Keyboard shortcuts

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