shard

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: ISC Imports: 10 Imported by: 0

Documentation

Overview

Copyright (c) 2020 The JaxNetwork developers Use of this source code is governed by an ISC license that can be found in the LICENSE file.

Copyright (c) 2020 The JaxNetwork developers Use of this source code is governed by an ISC license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chain

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

Types

type BeaconBlockProvider

type BeaconBlockProvider struct {
	BlockGenerator func(useCoinbaseValue bool) (mining.BlockTemplate, error)
	ShardCount     func() (uint32, error)
}

type BlockGenerator

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

func NewChainBlockGenerator

func NewChainBlockGenerator(beacon BeaconBlockProvider, mmr mmr2.IMountainRange) *BlockGenerator

func (*BlockGenerator) AcceptBlock

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

func (*BlockGenerator) NewBlockHeader

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

func (*BlockGenerator) ValidateBlock

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

Jump to

Keyboard shortcuts

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