eth, eth/downloader, miner: use download events to check miner start
This commit is contained in:
@ -42,8 +42,8 @@ func (err *UncleErr) Error() string {
|
||||
return err.Message
|
||||
}
|
||||
|
||||
func UncleError(str string) error {
|
||||
return &UncleErr{Message: str}
|
||||
func UncleError(format string, v ...interface{}) error {
|
||||
return &UncleErr{Message: fmt.Sprintf(format, v...)}
|
||||
}
|
||||
|
||||
func IsUncleErr(err error) bool {
|
||||
|
@ -3,10 +3,12 @@ package core
|
||||
import (
|
||||
"github.com/ethereum/go-ethereum/accounts"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/eth/downloader"
|
||||
"github.com/ethereum/go-ethereum/event"
|
||||
"github.com/ethereum/go-ethereum/p2p"
|
||||
)
|
||||
|
||||
// TODO move this to types?
|
||||
type Backend interface {
|
||||
AccountManager() *accounts.Manager
|
||||
BlockProcessor() *BlockProcessor
|
||||
@ -18,4 +20,5 @@ type Backend interface {
|
||||
BlockDb() common.Database
|
||||
StateDb() common.Database
|
||||
EventMux() *event.TypeMux
|
||||
Downloader() *downloader.Downloader
|
||||
}
|
||||
|
Reference in New Issue
Block a user