aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/mininode.py
AgeCommit message (Collapse)Author
2017-11-01qa: Remove never used return value of sync_with_pingMarcoFalke
Github-Pull: #11472 Rebased-From: fafa0039708e15d1067be091b2bfc10195afa480
2017-10-03qa: Treat mininode p2p exceptions as fatalSuhas Daftuar
Github-Pull: #11319 Rebased-From: a7820422e0b182db6f1df8904242e5d76d6c73fa
2017-10-03[tests] Make p2p-leaktests.py more robustJohn Newbery
Github-Pull: #11078 Rebased-From: 0063d2c3dce9d9c1678197d2c65ee878793d1ef9
2017-10-03qa: Move wait_until to utilMarcoFalke
Github-Pull: #11068 Rebased-From: 08ce33f8e95efa81b37ddc6b3350462c61bbfd51
2017-08-07[tests] Test disconnecting unsupported service bits logic.John Newbery
In v0.15, we disconnect nodes that send us version messages with unsupported service bits (1 << 5 and 1 << 7). This commit adds a test that bitcoind will disconnect those nodes before August 1st 2018, and won't disconnect those nodes after August 1st 2018.
2017-06-22Fixed multiple typosDimitris Tsapakidis
A few "a->an" and "an->a". "Shows, if the supplied default SOCKS5 proxy" -> "Shows if the supplied default SOCKS5 proxy". Change made on 3 occurrences. "without fully understanding the ramification of a command" -> "without fully understanding the ramifications of a command". Removed duplicate words such as "the the".
2017-05-09[tests] Make wait_until timeout 60 seconds by defaultJohn Newbery
2017-05-03[tests] fix wait_for_inv()John Newbery
2017-05-02Merge #10169: [tests] Remove func test code duplicationWladimir J. van der Laan
2a52ae6 Remove duplicate method definitions in NodeConnCB subclasses (John Newbery) 52e15aa Adds helper functions to NodeConnCB (John Newbery) Tree-SHA512: 2d7909eb85b3bde0fc3ebf133798eca21e561f4b2a2880937750820a42856cfb61fc94e30591c14ac13218bcfae0ebe7c5e8662a7b10f5b02470325c44a86cf1
2017-04-20Tests: Refactor to create witness script creation functionJimmy Song
* Refactor blocktools.py so that witness script creation is its own function * Changed p2p-segwit to use new function
2017-04-18Remove duplicate method definitions in NodeConnCB subclassesJohn Newbery
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-18Adds helper functions to NodeConnCBJohn Newbery
This commit adds some helper functions to NodeConnCB which are useful for many tests: - NodeConnCB now keeps track of the number of each message type that it's received and the most recent message of each type. Many tests assert on the most recent block, tx or reject message. - NodeConnCB now keeps track of its connection state by setting a connected boolean in on_open() and on_close() - NodeConnCB now has wait_for_block, wait_for_getdata, wait_for_getheaders, wait_for_inv and wait_for_verack methods I have updated the individual test cases to make sure that there are no namespace problems that cause them to fail with these new definitions. Future commits will remove the duplicate code.
2017-04-07Reduce spammy test loggingJohn Newbery
This commit reduces spammy logging by the test framework. It truncates logging send/receive message in mininode to 500 characters. mininode was previously logging the entire message sent received, which can be up to 1MB for a full block.
2017-03-30[tests] sync_with_ping should assert that ping hasn't timed outJohn Newbery
sync_with_ping currently returns false if the timeout expires, and it is the caller's responsibility to fail the test. However, none of the tests currently assert on sync_with_ping()'s return code. This commit adds an assert to sync_with_ping so the test will fail if the timeout expires. This commit also removes all the duplicate implementations of sync_with_ping() from the individual tests.
2017-03-28Remove SingleNodeConnCBJohn Newbery
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-20Rename rpc-tests directory to functionalJohn Newbery