diff options
author | gary rong <garyrong0905@gmail.com> | 2019-05-27 00:15:05 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2019-05-27 00:15:05 +0800 |
commit | 4e0c1a1a6b97ad062d79c7c8717273cc51f0111c (patch) | |
tree | 11ae0d7c4d9b28ffc729f378f86a18ed25924ffc /les/server.go | |
parent | 922e757f193a773548e2c6f6f7e503d6f8a7e373 (diff) | |
download | go-tangerine-4e0c1a1a6b97ad062d79c7c8717273cc51f0111c.tar go-tangerine-4e0c1a1a6b97ad062d79c7c8717273cc51f0111c.tar.gz go-tangerine-4e0c1a1a6b97ad062d79c7c8717273cc51f0111c.tar.bz2 go-tangerine-4e0c1a1a6b97ad062d79c7c8717273cc51f0111c.tar.lz go-tangerine-4e0c1a1a6b97ad062d79c7c8717273cc51f0111c.tar.xz go-tangerine-4e0c1a1a6b97ad062d79c7c8717273cc51f0111c.tar.zst go-tangerine-4e0c1a1a6b97ad062d79c7c8717273cc51f0111c.zip |
eth, les: reject light client connection is server is not synced (#19616)
* eth, les: reject light client connection is server is not synced
* eth, les: rename function and variables
* les: format
Diffstat (limited to 'les/server.go')
-rw-r--r-- | les/server.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/les/server.go b/les/server.go index 6c2b227f4..6b93b846d 100644 --- a/les/server.go +++ b/les/server.go @@ -74,7 +74,7 @@ func NewLesServer(eth *eth.Ethereum, config *eth.Config) (*LesServer, error) { nil, quitSync, new(sync.WaitGroup), - config.ULC) + config.ULC, eth.Synced) if err != nil { return nil, err } @@ -243,6 +243,7 @@ func (s *LesServer) Stop() { s.protocolManager.Stop() } +// todo(rjl493456442) separate client and server implementation. func (pm *ProtocolManager) blockLoop() { pm.wg.Add(1) headCh := make(chan core.ChainHeadEvent, 10) |