les: fix checkpoint sync (#20120)

This commit is contained in:
gary rong
2019-09-25 10:05:15 +02:00
committed by Martin Holst Swende
parent aca39a6498
commit 32b07e8b1f
4 changed files with 117 additions and 16 deletions
+6 -4
View File
@@ -40,14 +40,16 @@ type clientHandler struct {
downloader *downloader.Downloader
backend *LightEthereum
closeCh chan struct{}
wg sync.WaitGroup // WaitGroup used to track all connected peers.
closeCh chan struct{}
wg sync.WaitGroup // WaitGroup used to track all connected peers.
syncDone func() // Test hooks when syncing is done.
}
func newClientHandler(ulcServers []string, ulcFraction int, checkpoint *params.TrustedCheckpoint, backend *LightEthereum) *clientHandler {
handler := &clientHandler{
backend: backend,
closeCh: make(chan struct{}),
checkpoint: checkpoint,
backend: backend,
closeCh: make(chan struct{}),
}
if ulcServers != nil {
ulc, err := newULC(ulcServers, ulcFraction)