mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 07:36:44 +00:00
Merge branch 'ethereum:master' into portal
This commit is contained in:
commit
0f8632ed9b
2 changed files with 6 additions and 1 deletions
|
|
@ -135,7 +135,7 @@ func waitForRevalidationPing(t *testing.T, transport *pingRecorder, tab *Table,
|
|||
simclock.Run(tab.cfg.PingInterval * slowRevalidationFactor)
|
||||
p := transport.waitPing(2 * time.Second)
|
||||
if p == nil {
|
||||
t.Fatal("Table did not send revalidation ping")
|
||||
continue
|
||||
}
|
||||
if id == (enode.ID{}) || p.ID() == id {
|
||||
return p
|
||||
|
|
|
|||
|
|
@ -604,6 +604,11 @@ func (h *handshakeState) readMsg(msg interface{}, prv *ecdsa.PrivateKey, r io.Re
|
|||
}
|
||||
size := binary.BigEndian.Uint16(prefix)
|
||||
|
||||
// baseProtocolMaxMsgSize = 2 * 1024
|
||||
if size > 2048 {
|
||||
return nil, errors.New("message too big")
|
||||
}
|
||||
|
||||
// Read the handshake packet.
|
||||
packet, err := h.rbuf.read(r, int(size))
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue