aboutsummaryrefslogtreecommitdiffstats
path: root/les/sync.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-05-07 19:35:06 +0800
committerGitHub <noreply@github.com>2018-05-07 19:35:06 +0800
commit6cf0ab38bd0af77d81aad4c104979cebee9e3e63 (patch)
tree142d6f965c44dcf9e2182da67b7bbc978c573448 /les/sync.go
parent5463ed99968bf71685a2a8ee9dbf8705912f00cb (diff)
downloadgo-tangerine-6cf0ab38bd0af77d81aad4c104979cebee9e3e63.tar
go-tangerine-6cf0ab38bd0af77d81aad4c104979cebee9e3e63.tar.gz
go-tangerine-6cf0ab38bd0af77d81aad4c104979cebee9e3e63.tar.bz2
go-tangerine-6cf0ab38bd0af77d81aad4c104979cebee9e3e63.tar.lz
go-tangerine-6cf0ab38bd0af77d81aad4c104979cebee9e3e63.tar.xz
go-tangerine-6cf0ab38bd0af77d81aad4c104979cebee9e3e63.tar.zst
go-tangerine-6cf0ab38bd0af77d81aad4c104979cebee9e3e63.zip
core/rawdb: separate raw database access to own package (#16666)
Diffstat (limited to 'les/sync.go')
-rw-r--r--les/sync.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/les/sync.go b/les/sync.go
index c3d37e2f3..1ac645585 100644
--- a/les/sync.go
+++ b/les/sync.go
@@ -20,7 +20,7 @@ import (
"context"
"time"
- "github.com/ethereum/go-ethereum/core"
+ "github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/eth/downloader"
"github.com/ethereum/go-ethereum/light"
)
@@ -56,7 +56,7 @@ func (pm *ProtocolManager) syncer() {
func (pm *ProtocolManager) needToSync(peerHead blockInfo) bool {
head := pm.blockchain.CurrentHeader()
- currentTd := core.GetTd(pm.chainDb, head.Hash(), head.Number.Uint64())
+ currentTd := rawdb.ReadTd(pm.chainDb, head.Hash(), head.Number.Uint64())
return currentTd != nil && peerHead.Td.Cmp(currentTd) > 0
}