aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/handshake_test.go
Commit message (Collapse)AuthorAgeFilesLines
* p2p: new dialer, peer management without locksFelix Lange2015-05-251-172/+0
| | | | | | | | | | | | | | | | | | The most visible change is event-based dialing, which should be an improvement over the timer-based system that we have at the moment. The dialer gets a chance to compute new tasks whenever peers change or dials complete. This is better than checking peers on a timer because dials happen faster. The dialer can now make more precise decisions about whom to dial based on the peer set and we can test those decisions without actually opening any sockets. Peer management is easier to test because the tests can inject connections at checkpoints (after enc handshake, after protocol handshake). Most of the handshake stuff is now part of the RLPx code. It could be exported or move to its own package because it is no longer entangled with Server logic.
* p2p: fix disconnect at capacityFelix Lange2015-05-081-2/+3
| | | | | | | With the introduction of static/trusted nodes, the peer count can go above MaxPeers. Update the capacity check to handle this. While here, decouple the trusted nodes check from the handshake by passing a function instead.
* fixed merge issueobscuren2015-05-071-2/+2
|\
| * eth, p2p: add trusted node list beside static listPéter Szilágyi2015-05-041-2/+2
| |
| * eth, p2p: rename trusted nodes to static, drop inbound extra slotsPéter Szilágyi2015-05-011-2/+2
| |
| * p2p: add trust check to handshake, test privileged connectivityPéter Szilágyi2015-04-301-2/+2
| | | | | | | | | | Conflicts: p2p/server_test.go
* | p2p/discover: new endpoint formatFelix Lange2015-04-301-6/+6
|/ | | | | | This commit changes the discovery protocol to use the new "v4" endpoint format, which allows for separate UDP and TCP ports and makes it possible to discover the UDP address after NAT.
* p2p: improve disconnect signaling at handshake timeFelix Lange2015-04-101-2/+2
| | | | | | | As of this commit, p2p will disconnect nodes directly after the encryption handshake if too many peer connections are active. Errors in the protocol handshake packet are now handled more politely by sending a disconnect packet before closing the connection.
* p2p: make encryption handshake code easier to followFelix Lange2015-03-041-60/+65
| | | | | | | | | This mostly changes how information is passed around. Instead of using many function parameters and return values, put the entire state in a struct and pass that. This also adds back derivation of ecdhe-shared-secret. I deleted it by accident in a previous refactoring.
* p2p: encrypted and authenticated RLPx frame I/OFelix Lange2015-03-041-79/+21
|
* p2p: disable encryption handshakeFelix Lange2015-02-191-0/+224
The diff is a bit bigger than expected because the protocol handshake logic has moved out of Peer. This is necessary because the protocol handshake will have custom framing in the final protocol.