Documentation ¶
Index ¶
Constants ¶
View Source
const ( BlockGenerationInterval = time.Second BlockVersion = 1 )
Variables ¶
This section is empty.
Functions ¶
func UpdateLogger ¶
func UpdateLogger()
Types ¶
type AssertError ¶
type AssertError string
AssertError identifies an error that indicates an internal code consistency issue and should be treated as a critical and unrecoverable error.
func (AssertError) Error ¶
func (e AssertError) Error() string
Error returns the assertion error as a human-readable string and satisfies the error interface.
type BlockGenerator ¶
type BlockGenerator struct {
// contains filtered or unexported fields
}
func NewBlockGenerator ¶
func NewBlockGenerator(opts ...Option) (*BlockGenerator, error)
func (*BlockGenerator) Active ¶
func (g *BlockGenerator) Active() bool
func (*BlockGenerator) Close ¶
func (g *BlockGenerator) Close()
func (*BlockGenerator) Start ¶
func (g *BlockGenerator) Start()
type Option ¶
type Option func(cfg *config) error
Option is configuration option function for the mempool
func Blockchain ¶
func Blockchain(chain *blockchain.Blockchain) Option
Blockchain is the node's active blockchain.
func BroadcastFunc ¶
func BroadcastFunc(f func(blk *blocks.XThinnerBlock) error) Option
BroadcastFunc broadcasts the block to the network.
This cannot be nil.
func Mempool ¶
Mempool is the node's mempool object. This is needed to populate the block with transactions.
This cannot be nil.
func PrivateKey ¶
PrivateKey is the private key for the validator. It will be used to sign blocks.
This cannot be nil
Click to show internal directories.
Click to hide internal directories.