eth, les: reject stale request (#19689)

* eth, les: reject stale request

* les: reuse local head number
This commit is contained in:
gary rong
2019-06-11 15:40:32 +08:00
committed by Péter Szilágyi
parent 3d3e83ecff
commit c0a034ec89
5 changed files with 90 additions and 2 deletions

View File

@ -481,6 +481,7 @@ func (s *Ethereum) EthVersion() int { return int(s.protocolMa
func (s *Ethereum) NetVersion() uint64 { return s.networkID }
func (s *Ethereum) Downloader() *downloader.Downloader { return s.protocolManager.downloader }
func (s *Ethereum) Synced() bool { return atomic.LoadUint32(&s.protocolManager.acceptTxs) == 1 }
func (s *Ethereum) ArchiveMode() bool { return s.config.NoPruning }
// Protocols implements node.Service, returning all the currently configured
// network protocols to start.