diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-03-03 07:52:39 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2018-03-03 07:52:39 +0800 |
commit | ca64a122d33008c155c35a9d0e78cfbcafb1820a (patch) | |
tree | d82ca9f07ba8eadd116d08861e96c3283b1b76e4 /eth/downloader/downloader.go | |
parent | 12f4d284114a719e9a0779933e8770c352ed1767 (diff) | |
download | dexon-ca64a122d33008c155c35a9d0e78cfbcafb1820a.tar dexon-ca64a122d33008c155c35a9d0e78cfbcafb1820a.tar.gz dexon-ca64a122d33008c155c35a9d0e78cfbcafb1820a.tar.bz2 dexon-ca64a122d33008c155c35a9d0e78cfbcafb1820a.tar.lz dexon-ca64a122d33008c155c35a9d0e78cfbcafb1820a.tar.xz dexon-ca64a122d33008c155c35a9d0e78cfbcafb1820a.tar.zst dexon-ca64a122d33008c155c35a9d0e78cfbcafb1820a.zip |
eth/downloader: save and load trie sync progress (#16224)
Diffstat (limited to 'eth/downloader/downloader.go')
-rw-r--r-- | eth/downloader/downloader.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index d13247766..70febf4cb 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -27,6 +27,7 @@ import ( ethereum "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" @@ -221,7 +222,10 @@ func New(mode SyncMode, stateDb ethdb.Database, mux *event.TypeMux, chain BlockC quitCh: make(chan struct{}), stateCh: make(chan dataPack), stateSyncStart: make(chan *stateSync), - trackStateReq: make(chan *stateReq), + syncStatsState: stateSyncStats{ + processed: core.GetTrieSyncProgress(stateDb), + }, + trackStateReq: make(chan *stateReq), } go dl.qosTuner() go dl.stateFetcher() |