Documentation ¶
Index ¶
- func CalcShardBlockSubsidy(shards, bits, k uint32) int64
- func Chain(shardID uint32, params *chaincfg.Params, beaconGenesis *wire.BeaconHeader, ...) *shardChain
- type BeaconBlockProvider
- type BlockGenerator
- func (c *BlockGenerator) AcceptBlock(wire.BlockHeader) error
- func (c *BlockGenerator) CalcBlockSubsidy(_ int32, _ uint32, header wire.BlockHeader) int64
- func (c *BlockGenerator) NewBlockHeader(_ wire.BVersion, prevHash, merkleRootHash chainhash.Hash, timestamp time.Time, ...) (wire.BlockHeader, error)
- func (c *BlockGenerator) ValidateBlockHeader(header wire.BlockHeader) error
- func (c *BlockGenerator) ValidateCoinbaseTx(block *wire.MsgBlock, height int32) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcShardBlockSubsidy ¶
CalcShardBlockSubsidy returns reward for shard block. - height is block height; - shards is a number of shards that were mined by a miner at the time; - bits is current target; - k is inflation-fix-coefficient.
Types ¶
type BeaconBlockProvider ¶
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(_ int32, _ uint32, header wire.BlockHeader) int64
func (*BlockGenerator) NewBlockHeader ¶
func (*BlockGenerator) ValidateBlockHeader ¶
func (c *BlockGenerator) ValidateBlockHeader(header wire.BlockHeader) error
func (*BlockGenerator) ValidateCoinbaseTx ¶
func (c *BlockGenerator) ValidateCoinbaseTx(block *wire.MsgBlock, height int32) error
Click to show internal directories.
Click to hide internal directories.