52e15aa4d0
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. |
||
---|---|---|
.. | ||
__init__.py | ||
address.py | ||
authproxy.py | ||
bignum.py | ||
blockstore.py | ||
blocktools.py | ||
comptool.py | ||
coverage.py | ||
key.py | ||
mininode.py | ||
netutil.py | ||
script.py | ||
siphash.py | ||
socks5.py | ||
test_framework.py | ||
util.py |