[tests] refactor check_last_announcement() in sendheaders.py
commit25fd6e2c202c113a2413ba9df76fe0ea0e4cbe5c
authorJohn Newbery <john@johnnewbery.com>
Thu, 16 Nov 2017 16:52:45 +0000 (16 11:52 -0500)
committerJohn Newbery <john@johnnewbery.com>
Thu, 16 Nov 2017 17:05:27 +0000 (16 12:05 -0500)
treed6fc572fef926c3bdfa74365ebf4bd0c9e92da49
parentf39d4bbd1e328cb04a6ddb133511385491a90d84
[tests] refactor check_last_announcement() in sendheaders.py

All calls of check_last_announcement() asserted that the return
value was True. Just assert inside the function instead. This
gives better debug information if the assert fails.

Also only check the contents of the most recent inv and header if
check_last_announcement() is called with the relevant argument.
test/functional/sendheaders.py