Commit Graph
8 Commits
Author SHA1 Message Date
Callum WatersandGitHub 9efc20c963 p2p: improve PEX reactor (#6305) 2021-04-26 13:03:19 +02:00
Sam KleinmanandGitHub fce665ef06 p2p: fix network update test (#6361) 2021-04-19 18:02:21 -04:00
Aleksandr BezobchukandGitHub a554005136 p2p: revised router message scheduling (#6126) 2021-03-25 16:58:46 -04:00
Sam KleinmanandGitHub 2ceb816721 test infra: make memory network test buffers configurable (#6275) 2021-03-25 16:19:11 -04:00
Sam KleinmanandGitHub 99c73dd3c1 refactor blockchain/v0 tests to use p2ptest (#6256) 2021-03-19 16:40:43 -04:00
Sam KleinmanandGitHub acbe3f6570 P2P: Evidence Reactor Test Refactor (#6238) 2021-03-17 11:01:04 -04:00
Aleksandr BezobchukandGitHub 16bbe8c862 consensus: p2p refactor (#5969) 2021-02-16 11:02:52 -05:00
Erik GrinakerandGitHub 9b6d6a3ad0 p2p: tighten up Router and add tests (#6044)
This cleans up the `Router` code and adds a bunch of tests. These sorts of systems are a real pain to test, since they have a bunch of asynchronous goroutines living their own lives, so the test coverage is decent but not fantastic. Luckily we've been able to move all of the complex peer management and transport logic outside of the router, as synchronous components that are much easier to test, so the core router logic is fairly small and simple.

This also provides some initial test tooling in `p2p/p2ptest` that automatically sets up in-memory networks and channels for use in integration tests. It also includes channel-oriented test asserters in `p2p/p2ptest/require.go`, but these have primarily been written for router testing and should probably be adapted or extended for reactor testing.
2021-02-03 23:03:02 +00:00