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
775bb85efb
p2p/pex: wait to connect to all peers in reactor test
7 years ago
Ethan Buchman
44e967184a
p2p: tmconn->conn and types->p2p
7 years ago
Ethan Buchman
5b5cbaa66a
p2p: use sub dirs
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
caffix
949211a137
added a test for PEX reactor seed mode
7 years ago
Ethan Buchman
fc7915ab4c
fixes from review
7 years ago
Ethan Buchman
3df5fd21cd
better abuse handling in pex
7 years ago
Ethan Buchman
8b74a8d6ac
NodeInfo not a pointer
7 years ago
Ethan Buchman
7667e11973
remove RemoteAddr from NodeInfo
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
Ethan Buchman
6e823c6e87
p2p: support addr format ID@IP:PORT
7 years ago
Ethan Buchman
7d35500e6b
p2p: add ID to NetAddress and use for AddrBook
7 years ago
Ethan Buchman
0ec7909ec3
more logging in p2p and consensus
7 years ago
Anton Kaliaev
691e266bef
ignore ErrAlreadyStarted when starting addrbook in PEXReactor
7 years ago
Anton Kaliaev
69b5da766c
service#Start, service#Stop signatures were changed
See https://github.com/tendermint/tmlibs/issues/45
7 years ago
Zach Ramsay
d7cb291fb2
errcheck; sort some stuff out
7 years ago
Zach Ramsay
15651a931e
linting errors: tackle p2p package
7 years ago
Ethan Buchman
26cd99c66e
p2p: fix non-routable addr in test
7 years ago
Anton Kaliaev
e0daca5693
fixes from Bucky's review
7 years ago
Anton Kaliaev
2d4ad02356
prefer tickers to time.Sleep (Refs #790 )
7 years ago
Ethan Buchman
aea8629272
peer interface
7 years ago
Ethan Buchman
cc2b418f7f
p2p: test fix
7 years ago
Anton Kaliaev
c5bccc5474
set missing logger on switch
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x882cec]
goroutine 328 [running]:
github.com/tendermint/tendermint/p2p.(*Switch).DialPeerWithAddress(0xc42000a500, 0xc4202088d0, 0xc420403500, 0x0, 0x0, 0x0)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/switch.go:324 +0x2fc
github.com/tendermint/tendermint/p2p.(*PEXReactor).ensurePeers.func1(0xc4201663f0, 0xc4202088d0)
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/pex_reactor.go:280 +0x3e
created by github.com/tendermint/tendermint/p2p.(*PEXReactor).ensurePeers
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/pex_reactor.go:284 +0x5d4
```
8 years ago
Anton Kaliaev
c9cd8de9c6
set logger
8 years ago
Anton Kaliaev
f803544195
new logging
8 years ago
Ethan Buchman
5d660e073a
remove viper from p2p
8 years ago
Ethan Buchman
23a6a6f8fc
move into p2p package
8 years ago
Ethan Buchman
eaeb547938
use tmlibs
8 years ago
Anton Kaliaev
17ec70fc09
revert 2710873
8 years ago
Anton Kaliaev
0277e52bd5
fix merge
8 years ago
Anton Kaliaev
5eeaffd38e
do not create file, just temp dir
8 years ago
Anton Kalyaev
873d34157d
prevent abuse from peers
8 years ago
Anton Kalyaev
47df1fb7d4
test PEXReactor#Receive
8 years ago
Anton Kalyaev
0109f1e524
test ensurePeers goroutine
8 years ago