()
| 334 | |
| 335 | def wait_for_header(self, blockhash, timeout=60): |
| 336 | def test_function(): |
| 337 | last_headers = self.last_message.get('headers') |
| 338 | if not last_headers: |
| 339 | return False |
| 340 | return last_headers.headers[0].rehash() == blockhash |
| 341 | |
| 342 | wait_until(test_function, timeout=timeout, lock=mininode_lock) |
| 343 |