Zarko Milosevic
4accdb5f59
Example of client send task and monitor task
2018-04-19 12:34:42 +02:00
Ethan Buchman
c170800fbd
Merge branch 'develop' into jae/aminoify
2018-04-07 16:16:53 +03:00
Jae Kwon
fb64314d1c
Review from Anton
2018-04-06 13:46:40 -07: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
Anton Kaliaev
22949e6dfd
new tmlibs Parallel implementation
2018-03-28 19:13:08 +02:00
Jae Kwon
901b456151
P2P now works with Amino
2018-03-26 06:40:02 +02:00
Jae Kwon
ced74251e9
maxPacketMsg -> packetMsgMax...
2018-03-21 02:47:38 +01:00
Jae Kwon
6c345f9fa2
First stab: p2p/conn
2018-03-21 02:27:10 +01:00
Zach
2cc63069c6
rename dummy to kvstore ( #1223 )
...
* remove accidental binary
* docs: s/Dummy&dummy/KVStore&kvstore/g
* glide update to abci
* update abci import paths
* dummy begone, hello kvstore
* RequestInitChain needs genesisBytes
* glide update
2018-02-27 18:01:10 +04:00
Anton Kaliaev
fc585bcdec
do not block when writing to pongTimeoutCh
...
Refs #1205
2018-02-12 17:04:07 +04:00
Anton Kaliaev
22b038810a
do not block in recvRoutine
2018-02-09 23:03:26 +04:00
Anton Kaliaev
45750e1b29
fix race by sending signal instead of stopping pongTimer
2018-02-09 21:32:29 +04:00
Anton Kaliaev
26419fba28
refactor code plus add one more test
...
* extract stopPongTimer method
* TestMConnectionMultiplePings
2018-02-09 21:32:29 +04:00
Anton Kaliaev
ac0123d249
drain pongTimeoutCh and pongTimer's channel to prevent leaks
2018-02-09 21:32:29 +04:00
Anton Kaliaev
f4ff66de30
rewrite pong timer to use time.AfterFunc
2018-02-09 21:32:29 +04:00
Anton Kaliaev
747b73cb95
fix merge conflicts
2018-02-09 21:32:29 +04:00
Anton Kaliaev
161e100a24
close return channel when we're done
...
Benchmark results:
```
BenchmarkSwitchBroadcast-2 30000 71275 ns/op
--- BENCH: BenchmarkSwitchBroadcast-2
switch_test.go:339: success: 1, failure: 0
switch_test.go:339: success: 100, failure: 0
switch_test.go:339: success: 10000, failure: 0
switch_test.go:339: success: 30000, failure: 0
```
2018-02-09 21:32:29 +04:00
Anton Kaliaev
3ae738f453
increase timeouts
2018-02-09 21:32:29 +04:00
Anton Kaliaev
860da464df
remove weird concurrency testing
2018-02-09 21:32:28 +04:00
Anton Kaliaev
4e2000abfe
control order by sending msgs from one goroutine
2018-02-09 21:32:28 +04:00
Anton Kaliaev
5834a59816
read ping
2018-02-09 21:32:28 +04:00
Anton Kaliaev
b28b76ddf7
rename pingTimeout to pingInterval, pongTimer is now time.Timer
2018-02-09 21:32:28 +04:00
zbo14
91e4f4b786
ping/pong timeout in config
2018-02-09 21:32:28 +04:00
zbo14
9b554fb2c4
switch test modification
2018-02-09 21:32:28 +04:00
zbo14
f97ead4f5f
prep for merge
2018-02-09 21:32:28 +04:00
zbo14
5af22d6ee6
remove SwitchEventNewPeer, SwitchEventDonePeer
2018-02-09 21:32:28 +04:00
zbo14
1d16df6a92
add test, TrySend in broadcast
2018-02-09 21:32:27 +04:00
Anton Kaliaev
3f9aa8d8fa
document that msgBytes in p2p/connection change
2018-02-08 13:25:26 +04:00
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 :)
2018-02-08 13:08:11 +04:00
Ethan Buchman
7640e6a29f
add some p2p TODOs
2018-02-08 12:46:04 +04:00
Ethan Buchman
426379dc47
remove use of wire/nowriter
2018-02-03 03:39:14 -05:00
Ethan Buchman
baff4bd8cc
p2p/conn: better handling for some stop conditions
2018-01-25 02:11:16 -05:00
Ethan Buchman
44e967184a
p2p: tmconn->conn and types->p2p
2018-01-21 00:34:41 -05:00