mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-20 03:36:44 +00:00
This commit is contained in:
parent
5c2ac4d51c
commit
6fc437394c
2 changed files with 15 additions and 17 deletions
|
|
@ -231,7 +231,7 @@ func ExpectMsg(r MsgReader, code uint64, content interface{}) error {
|
|||
}
|
||||
if content == nil {
|
||||
return msg.Discard()
|
||||
} else {
|
||||
}
|
||||
contentEnc, err := rlp.EncodeToBytes(content)
|
||||
if err != nil {
|
||||
panic("content encode error: " + err.Error())
|
||||
|
|
@ -246,7 +246,6 @@ func ExpectMsg(r MsgReader, code uint64, content interface{}) error {
|
|||
if !bytes.Equal(actualContent, contentEnc) {
|
||||
return fmt.Errorf("message payload mismatch:\ngot: %x\nwant: %x", actualContent, contentEnc)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -746,7 +746,6 @@ func (net *Network) executeNodeEvent(e *Event) error {
|
|||
func (net *Network) executeConnEvent(e *Event) error {
|
||||
if e.Conn.Up {
|
||||
return net.Connect(e.Conn.One, e.Conn.Other)
|
||||
} else {
|
||||
return net.Disconnect(e.Conn.One, e.Conn.Other)
|
||||
}
|
||||
return net.Disconnect(e.Conn.One, e.Conn.Other)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue