Commit graph

9 commits

Author SHA1 Message Date
MarcoFalke
fac9349798 [qa] Remove hardcoded "4 nodes" from test_framework 2016-05-15 12:58:53 +02:00
MarcoFalke
fa389d4edc [qa] Switch to py3 2016-05-05 15:43:37 +02:00
MarcoFalke
fac724c78f [qa] maxblocksinflight: Actually enable test 2016-04-03 20:49:32 +02:00
MarcoFalke
fa60d05a4e Add missing copyright headers 2016-01-05 21:34:15 +01:00
Wladimir J. van der Laan
2f601d215d test: remove necessity to call create_callback_map
Remove necessity to call create_callback_map (as well as the function
itself) from the Python P2P test framework. Invoke the appropriate
methods directly.

- Easy to forget to call it and wonder why it doesn't work
- Simplifies the code
- This makes it easier to handle new messages in subclasses
2015-12-04 13:15:59 +01:00
Jonas Schnelli
64937fe51a [QA] restructure rpc tests directory
* move non-test classes to subdir `test-framework`
2015-05-18 15:25:45 +02:00
Suhas Daftuar
574db4816f Fix potential race conditions in p2p testing framework
Previously, each NodeConnCB had its own lock to synchronize data structures
used by the testing thread and the networking thread, and NodeConn provided a
separate additional lock for synchronizing access to each send buffer.  This
commit replaces those locks with a single global lock (mininode_lock) that we
use to synchronize access to all data structures shared by the two threads.

Updates comptool and maxblocksinflight to use the new synchronization
semantics, eliminating previous race conditions within comptool, and re-enables
invalidblockrequest.py in travis.
2015-05-01 15:32:24 -04:00
Suhas Daftuar
2703412a39 Fix default binary in p2p tests to use environment variable 2015-04-29 09:18:33 -04:00
Suhas Daftuar
6c1d1ba6fc Python p2p testing framework
mininode.py provides a framework for connecting to a bitcoin node over the p2p
network. NodeConn is the main object that manages connectivity to a node and
provides callbacks; the interface for those callbacks is defined by NodeConnCB.
Defined also are all data structures from bitcoin core that pass on the network
(CBlock, CTransaction, etc), along with de-/serialization functions.

maxblocksinflight.py is an example test using this framework that tests whether
a node is limiting the maximum number of in-flight block requests.

This also adds support to util.py for specifying the binary to use when
starting nodes (for tests that compare the behavior of different bitcoind
versions), and adds maxblocksinflight.py to the pull tester.
2015-04-28 12:38:29 -04:00