aboutsummaryrefslogtreecommitdiffstats
path: root/internal/ethapi
diff options
context:
space:
mode:
authorSonic <sonic@dexon.org>2018-11-09 14:49:23 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-12 12:19:09 +0800
commite508bf0a8074e803cbcdaa162fd3289de2afda94 (patch)
treeac10c3cced1f817d12bd2e4c0c9e50d8a1d7e3bd /internal/ethapi
parent202b8a467827118e1243b98dbd8111c3d806211e (diff)
downloaddexon-e508bf0a8074e803cbcdaa162fd3289de2afda94.tar
dexon-e508bf0a8074e803cbcdaa162fd3289de2afda94.tar.gz
dexon-e508bf0a8074e803cbcdaa162fd3289de2afda94.tar.bz2
dexon-e508bf0a8074e803cbcdaa162fd3289de2afda94.tar.lz
dexon-e508bf0a8074e803cbcdaa162fd3289de2afda94.tar.xz
dexon-e508bf0a8074e803cbcdaa162fd3289de2afda94.tar.zst
dexon-e508bf0a8074e803cbcdaa162fd3289de2afda94.zip
dex: use dex/downloader in dex
To compatible with ethereum code base, make Downloader a interface in internal/ethapi
Diffstat (limited to 'internal/ethapi')
-rw-r--r--internal/ethapi/backend.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/ethapi/backend.go b/internal/ethapi/backend.go
index 945db74e3..85383a71f 100644
--- a/internal/ethapi/backend.go
+++ b/internal/ethapi/backend.go
@@ -21,24 +21,28 @@ import (
"context"
"math/big"
+ ethereum "github.com/dexon-foundation/dexon"
"github.com/dexon-foundation/dexon/accounts"
"github.com/dexon-foundation/dexon/common"
"github.com/dexon-foundation/dexon/core"
"github.com/dexon-foundation/dexon/core/state"
"github.com/dexon-foundation/dexon/core/types"
"github.com/dexon-foundation/dexon/core/vm"
- "github.com/dexon-foundation/dexon/eth/downloader"
"github.com/dexon-foundation/dexon/ethdb"
"github.com/dexon-foundation/dexon/event"
"github.com/dexon-foundation/dexon/params"
"github.com/dexon-foundation/dexon/rpc"
)
+type Downloader interface {
+ Progress() ethereum.SyncProgress
+}
+
// Backend interface provides the common API services (that are provided by
// both full and light clients) with access to necessary functions.
type Backend interface {
// General Ethereum API
- Downloader() *downloader.Downloader
+ Downloader() Downloader
ProtocolVersion() int
SuggestPrice(ctx context.Context) (*big.Int, error)
ChainDb() ethdb.Database