eth, les: reject stale request (#19689)
* eth, les: reject stale request * les: reuse local head number
This commit is contained in:
committed by
Péter Szilágyi
parent
3d3e83ecff
commit
c0a034ec89
@ -551,7 +551,14 @@ func (p *peer) Handshake(td *big.Int, head common.Hash, headNum uint64, genesis
|
||||
send = send.add("serveHeaders", nil)
|
||||
send = send.add("serveChainSince", uint64(0))
|
||||
send = send.add("serveStateSince", uint64(0))
|
||||
send = send.add("serveRecentState", uint64(core.TriesInMemory-4))
|
||||
|
||||
// If local ethereum node is running in archive mode, advertise ourselves we have
|
||||
// all version state data. Otherwise only recent state is available.
|
||||
stateRecent := uint64(core.TriesInMemory - 4)
|
||||
if server.archiveMode {
|
||||
stateRecent = 0
|
||||
}
|
||||
send = send.add("serveRecentState", stateRecent)
|
||||
send = send.add("txRelay", nil)
|
||||
}
|
||||
send = send.add("flowControl/BL", server.defParams.BufLimit)
|
||||
|
Reference in New Issue
Block a user