diff options
author | Sonic <sonic@dexon.org> | 2018-11-09 14:49:23 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:53 +0800 |
commit | a31ae3fde50d3402e838483c985dbe50d753b48c (patch) | |
tree | bd58f09231948a732bb23db753ca83605f85bffe /internal | |
parent | 089257a3da86184c66f666ff8e119e1ca7850357 (diff) | |
download | go-tangerine-a31ae3fde50d3402e838483c985dbe50d753b48c.tar go-tangerine-a31ae3fde50d3402e838483c985dbe50d753b48c.tar.gz go-tangerine-a31ae3fde50d3402e838483c985dbe50d753b48c.tar.bz2 go-tangerine-a31ae3fde50d3402e838483c985dbe50d753b48c.tar.lz go-tangerine-a31ae3fde50d3402e838483c985dbe50d753b48c.tar.xz go-tangerine-a31ae3fde50d3402e838483c985dbe50d753b48c.tar.zst go-tangerine-a31ae3fde50d3402e838483c985dbe50d753b48c.zip |
dex: use dex/downloader in dex
To compatible with ethereum code base, make Downloader a
interface in internal/ethapi
Diffstat (limited to 'internal')
-rw-r--r-- | internal/ethapi/backend.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/ethapi/backend.go b/internal/ethapi/backend.go index 2b4e6f0fc..801b55d5c 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 |