aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-15 06:43:00 +0800
committerobscuren <geffobscura@gmail.com>2015-05-15 06:43:10 +0800
commitb71091e337fef7e3cfad56c61c97a42094e87531 (patch)
treee3945e86e63714aeb77569cca28329a73de608d7 /core
parent0f76a1c6df44bc3242a64e76bef66dfe312d259b (diff)
downloaddexon-b71091e337fef7e3cfad56c61c97a42094e87531.tar
dexon-b71091e337fef7e3cfad56c61c97a42094e87531.tar.gz
dexon-b71091e337fef7e3cfad56c61c97a42094e87531.tar.bz2
dexon-b71091e337fef7e3cfad56c61c97a42094e87531.tar.lz
dexon-b71091e337fef7e3cfad56c61c97a42094e87531.tar.xz
dexon-b71091e337fef7e3cfad56c61c97a42094e87531.tar.zst
dexon-b71091e337fef7e3cfad56c61c97a42094e87531.zip
eth, eth/downloader, miner: use download events to check miner start
Diffstat (limited to 'core')
-rw-r--r--core/error.go4
-rw-r--r--core/manager.go3
2 files changed, 5 insertions, 2 deletions
diff --git a/core/error.go b/core/error.go
index 40db99ecd..2bdad364f 100644
--- a/core/error.go
+++ b/core/error.go
@@ -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 {
diff --git a/core/manager.go b/core/manager.go
index 433ada7ee..695f0e99c 100644
--- a/core/manager.go
+++ b/core/manager.go
@@ -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
}