Commit Graph

30 Commits

Author SHA1 Message Date
Alexander Simmerl 5796e879b9
Introduce option to skip duplicate ip check
In some scenarios like tests we want to disable the guard which prevents
peers connecting from the same ip.

Fixes #1632
Closes #1634
2018-05-30 10:40:22 +02:00
Alexander Simmerl b698a9febc
Remove double locking in HasIP 2018-05-16 19:21:12 +02:00
Alexander Simmerl 77f09f5b5e
Move to ne.IP 2018-05-16 19:21:12 +02:00
Ethan Buchman 1fe41be929
p2p: prevent connections from same ip 2018-05-16 19:21:12 +02:00
Thomas Corbière 2644a529f0 Fix lint errors (#1390)
* use increment and decrement operators.

* remove unnecessary else branches.

* fix package comment with leading space.

* fix receiver names.

* fix error strings.

* remove omittable code.

* remove redundant return statement.

* Revert changes (code is generated.)

* use cfg as receiver name for all config-related types.

* use lsi as the receiver name for the LastSignedInfo type.
2018-04-02 10:21:17 +02:00
Ethan Buchman a17105fd46 p2p: peer.Key -> peer.ID 2018-01-01 22:39:05 -05:00
Ethan Buchman aea8629272 peer interface 2017-09-15 18:40:59 -04:00
Ethan Buchman 54c63726b0 p2p: minor comment fixes 2017-09-06 16:40:21 -04:00
Emmanuel Odeke c48e772115
p2p: fully test PeerSet, more docs, parallelize PeerSet tests
* Full test PeerSet and check its concurrent guarantees
* Improve the doc for PeerSet.Has and remove unnecessary
defer for a path that sets a variable, make it fast anyways.
* Parallelize PeerSet tests with t.Parallel()
* Document functions in peer_set.go more.
2017-09-06 02:47:31 -06:00
Ethan Buchman 16509ac3db
p2p: fix race by peer.Start() before peers.Add() 2017-05-13 10:24:59 +02:00
Ethan Buchman 23a6a6f8fc move into p2p package 2017-04-21 18:07:52 -04:00
Jae Kwon c4ed55d801 Refactor to move common libraries out of project 2015-10-22 17:39:06 -07:00
Jae Kwon e4c351f5fc UUID -> PubKeyEd25519 2015-07-15 14:31:03 -07:00
Jae Kwon dbef516659 failing tests for secret_connection 2015-07-14 18:41:24 -07:00
Jae Kwon d91f073676 uuid branch tidying 2015-07-13 16:00:01 -07:00
Jae Kwon bdc2711f27 p2p comment prettify 2015-07-13 13:17:47 -07:00
Ethan Buchman 0728539bc1 limit num connections per ip range 2015-07-12 17:54:34 +00:00
Ethan Buchman 555dab4fd6 limit number of allowed connections per ip 2015-07-12 02:16:33 +00:00
Ethan Buchman d0610845dc peers use uuid to avoid duplicate connections 2015-07-12 02:16:33 +00:00
Jae Kwon cebfae60c7 BlockchainReactor syncs first before ConsensusReactor. 2015-03-25 11:50:28 -07:00
Jae Kwon 08a83aa9fb Reactors can be stopped or started at any time. 2015-03-25 00:15:18 -07:00
Jae Kwon 0237d284cc Channel bytes are spelled fully, "XXXChannel" 2015-03-24 12:00:27 -07:00
Jae Kwon 85110224b4 Fix PeerSet.Remove() bug. 2015-01-21 13:40:26 -08:00
Jae Kwon fa7c83166f P2P docs 2014-12-23 19:31:24 -08:00
Jae Kwon 666122861c implementing block_manager. currently only supports one datatype. 2014-07-29 23:53:35 -07:00
Jae Kwon ac668d4d14 Don't dial dupes 2014-07-15 15:54:33 -07:00
Jae Kwon 56a92b512f Send external addresses upon new outbound peer 2014-07-14 14:04:26 -07:00
Jae Kwon 0b1265dc10 . 2014-07-10 22:14:23 -07:00
Jae Kwon 04eb07c26f fixed a bug 2014-07-08 08:34:49 -07:00
Jae Kwon ce51af9d4d PeerSet is for fast iteration of peers 2014-07-08 00:02:04 -07:00