Documentation
¶
Overview ¶
Package miner implements Ethereum block creation and mining.
Index ¶
- func BlockChain() *core.BlockChain
- func ChainConfig() *params.ChainConfig
- func ChainDb() ethdb.Database
- func DoLockout(signedTx *types.Transaction, bn uint64)
- func DoLockout2(signedTx *types.Transaction, ch chan string)
- func GetCurrentBlockHeight() uint64
- func GetDcrmAddr(dcrmaddr string, cointype string, coin string) string
- func GetDcrmAddrOutSideBalance(dcrmaddr string, cointype string) *big.Int
- func HandleLockout(lotxs []*types.Transaction, bn uint64)
- func PendingBlock() *types.Block
- func SetBackend(e Backend)
- func TxPool() *core.TxPool
- type Backend
- type Miner
- func (self *Miner) Close()
- func (self *Miner) HashRate() uint64
- func (self *Miner) Mining() bool
- func (self *Miner) Pending() (*types.Block, *state.StateDB)
- func (self *Miner) PendingBlock() *types.Block
- func (self *Miner) SetEtherbase(addr common.Address)
- func (self *Miner) SetExtra(extra []byte) error
- func (self *Miner) SetRecommitInterval(interval time.Duration)
- func (self *Miner) Start(coinbase common.Address)
- func (self *Miner) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockChain ¶
func BlockChain() *core.BlockChain
func ChainConfig ¶
func ChainConfig() *params.ChainConfig
func DoLockout ¶
func DoLockout(signedTx *types.Transaction, bn uint64)
func DoLockout2 ¶
func DoLockout2(signedTx *types.Transaction, ch chan string)
func GetCurrentBlockHeight ¶
func GetCurrentBlockHeight() uint64
func HandleLockout ¶
func HandleLockout(lotxs []*types.Transaction, bn uint64)
func PendingBlock ¶
func SetBackend ¶
func SetBackend(e Backend)
Types ¶
type Backend ¶
type Backend interface { BlockChain() *core.BlockChain TxPool() *core.TxPool ChainConfig() *params.ChainConfig Miner() *Miner ChainDb() ethdb.Database }
Backend wraps all methods required for mining.
var (
FSN Backend
)
type Miner ¶
type Miner struct {
// contains filtered or unexported fields
}
Miner creates blocks and searches for proof-of-work values.
func (*Miner) PendingBlock ¶
PendingBlock returns the currently pending block.
Note, to access both the pending block and the pending state simultaneously, please use Pending(), as the pending state can change between multiple method calls
func (*Miner) SetEtherbase ¶
func (*Miner) SetRecommitInterval ¶
SetRecommitInterval sets the interval for sealing work resubmitting.
Click to show internal directories.
Click to hide internal directories.