Commit graph

5 commits

Author SHA1 Message Date
John Newbery
c9cc76dcaa [tests] Remove is_network_split from funtional test cases 2017-05-02 13:31:54 -04:00
John Newbery
2a52ae63bf Remove duplicate method definitions in NodeConnCB subclasses
All Node classes in individual test cases subclass from NodeConnCB. Many
have duplicate definitions for methods that are defined in the base
class. This commit removes those duplicate definitions.

This commit removes ~290 lines of duplicate code.
2017-04-18 17:20:09 -04:00
John Newbery
6426716a99 Add send_await_disconnect() method to p2p-compactblocks.py
p2p-compactblocks was incorrectly using sync_with_ping() when sending in
invalid block. The node would disconnect us and never respond to the
ping, so the sync_with_ping would just time out after 30 seconds and
continue with the test.

This commit adds a send_await_disconnect() method that sends the
message, and then waits for the node to disconnect us. In this commit
I've added the method to p2p-compactblocks.py, but a future commit could
move it to mininode since it could be useful more generally.

This commit reduces the p2p-compactblock runtime by 30 seconds.
2017-03-30 08:39:12 -04:00
John Newbery
159fe88abf Remove SingleNodeConnCB
This commit merges the NodeConnCB and SingleNodeConnCB into a single
class (called NodeConnCB). The original intent for the NodeConnCB was to
be able to have a python 'mininode' connect to multiple running
bitcoinds. This has never been used and can be achieved more easily by
having multiple NodeConns backed by a common datastore if it is ever
needed.

The changes in mininode.py are just code moves (and merging the two
classes into a single class). The code changes in the individual test
cases are changing the subclasses to subclass from NodeConnCB instead of
SingleNodeConnCB. There is a lot of duplicate code in the subclasses
that can be removed in future commits.
2017-03-28 14:16:21 -04:00
John Newbery
c28ee91db0 Rename rpc-tests directory to functional 2017-03-20 10:40:31 -04:00
Renamed from test/rpc-tests/p2p-compactblocks.py (Browse further)