Documentation ¶
Overview ¶
Package miner implements Ethereum block creation and mining.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { BlockChain() *core.BlockChain TxPool() *txpool.TxPool }
Backend wraps all methods required for mining.
type Config ¶
type Config struct { Etherbase common.Address `toml:",omitempty"` // Public address for block mining rewards TestOnlyAllowDuplicateBlocks bool // Allow mining of duplicate blocks (used in tests only) }
Config is the configuration parameters of mining.
type Miner ¶
type Miner struct {
// contains filtered or unexported fields
}
func (*Miner) GenerateBlock ¶
func (miner *Miner) GenerateBlock(predicateContext *precompileconfig.PredicateContext) (*types.Block, error)
func (*Miner) SetEtherbase ¶
func (*Miner) SubscribePendingLogs ¶
func (miner *Miner) SubscribePendingLogs(ch chan<- []*types.Log) event.Subscription
SubscribePendingLogs starts delivering logs from pending transactions to the given channel.
type TransactionsByPriceAndNonce ¶
type TransactionsByPriceAndNonce = transactionsByPriceAndNonce
func NewTransactionsByPriceAndNonce ¶
func NewTransactionsByPriceAndNonce(signer types.Signer, txs map[common.Address][]*txpool.LazyTransaction, baseFee *big.Int) *TransactionsByPriceAndNonce
Click to show internal directories.
Click to hide internal directories.