zbo14
1d16df6a92
add test, TrySend in broadcast
7 years ago
Anton Kaliaev
3f9aa8d8fa
document that msgBytes in p2p/connection change
7 years ago
Anton Kaliaev
d6d1f8512d
do not reset pingTimer
don't bother with this "only ping when we havent heard from them". lets
just always ping every peer from the sendRoutine every 10s no matter
what. if they dont pong within pongTimeout, disconnect :)
7 years ago
Anton Kaliaev
2b2c233977
write docs for Reactor interface
7 years ago
Ethan Buchman
7640e6a29f
add some p2p TODOs
7 years ago
Anton Kaliaev
11b68f1934
rewrite broadcastTxRoutine to use channels
https://play.golang.org/p/gN21yO9IRs3
```
func waitWithCancel(f func() *clist.CElement, ctx context.Context) *clist.CElement {
el := make(chan *clist.CElement, 1)
select {
case el <- f():
```
will just run f() blockingly, so this doesn't change much in terms of behavior.
7 years ago
Ethan Buchman
426379dc47
remove use of wire/nowriter
7 years ago
Ethan Buchman
baff4bd8cc
p2p/conn: better handling for some stop conditions
7 years ago
Ethan Buchman
b6eb275b22
p2p: fix break in double loop
7 years ago
Ethan Buchman
99034904f8
p2p: fix tests for required channels
7 years ago
Ethan Buchman
50129ad8ac
p2p: add Channels to NodeInfo and don't send for unknown channels
7 years ago
Ethan Buchman
8f3bd3f209
p2p: addrBook.Save() on DialPeersAsync
7 years ago
Ethan Buchman
85816877c6
config: fix addrbook path to go in config
7 years ago
Ethan Buchman
775bb85efb
p2p/pex: wait to connect to all peers in reactor test
7 years ago
Ethan Buchman
21ce5856b3
p2p: notes about ListenAddr
7 years ago
Ethan Buchman
3090b05eb4
p2p: use conn.Close when peer is nil
7 years ago
Ethan Buchman
44e967184a
p2p: tmconn->conn and types->p2p
7 years ago
Ethan Buchman
0d7d16005a
fixes
7 years ago
Ethan Buchman
5b5cbaa66a
p2p: use sub dirs
7 years ago
Ethan Buchman
03550c7076
wip addrbook
7 years ago
Ethan Buchman
930fde056a
p2p: add back lost func
7 years ago
Ethan Buchman
8d758560d8
p2p/trustmetric: non-deterministic test
7 years ago
Ethan Buchman
7b87cdaed8
p2p: seed disconnects after sending addrs
7 years ago
Ethan Buchman
c2f97e6454
p2p: seed mode fixes from rebase and review
7 years ago
Ethan Buchman
88eb3e7af0
some minor renames
7 years ago
caffix
949211a137
added a test for PEX reactor seed mode
7 years ago
Ethan Buchman
8171628ee5
make tests run faster
7 years ago
Ethan Buchman
fc7915ab4c
fixes from review
7 years ago
Zach Ramsay
26aaa283a9
p2p: remove deprecated Dockerfile
7 years ago
Zach
a29c67563c
Update p2p README, closes #1102
7 years ago
Ethan Buchman
17f7a9b510
improve seed dialing logic
7 years ago
Ethan Buchman
3df5fd21cd
better abuse handling in pex
7 years ago
Ethan Buchman
68237911ba
NetAddress.Same checks ID or DialString
7 years ago
Ethan Buchman
f9e4f6eb6b
reorder peer.go methods
7 years ago
Ethan Buchman
8b74a8d6ac
NodeInfo not a pointer
7 years ago
Ethan Buchman
08f84cd712
a little more moving around
7 years ago
Ethan Buchman
452d10f368
cleanup switch
7 years ago
Ethan Buchman
7667e11973
remove RemoteAddr from NodeInfo
7 years ago
Ethan Buchman
53a5498fc5
more fixes from review
7 years ago
Ethan Buchman
e4d52401cf
some fixes from review
7 years ago
Ethan Buchman
9670519a21
remove PoW from ID
7 years ago
Ethan Buchman
c1e167e330
note in trust metric test
7 years ago
Ethan Buchman
e2b3b5b58c
dial_persistent_peers -> dial_peers with persistent option
7 years ago
Anton Kaliaev
075ae1e301
minimal test for dialing seeds in pex reactor
7 years ago
Anton Kaliaev
705d51aa42
move dialSeedsIfAddrBookIsEmptyOrPEXFailedToConnect into PEX reactor
7 years ago
Anton Kaliaev
e4897b7bdd
rename manual peers to persistent peers
7 years ago
Anton Kaliaev
28fc15028a
distinguish between seeds and manual peers in the config/flags
- we only use seeds if we can’t connect to peers in the addrbook.
- we always connect to nodes given in config/flags
Refs #864
7 years ago
Adrian Brink
f602de437e
Move P2P docs into docs folder
7 years ago
Ethan Buchman
488ae529ad
p2p: authenticate peer ID
7 years ago
Ethan Buchman
6e823c6e87
p2p: support addr format ID@IP:PORT
7 years ago