tests: test_network: intro MockBlockchain. rewrite tests to use it.

interface.py no longer has knowledge about mocking! :P
This commit is contained in:
SomberNight
2025-06-09 18:59:31 +00:00
parent cb1789a59c
commit 02c6e118f0
4 changed files with 91 additions and 67 deletions
+1 -1
View File
@@ -626,7 +626,7 @@ class Blockchain(Logger):
work_in_last_partial_chunk = (height % CHUNK_SIZE + 1) * work_in_single_header
return running_total + work_in_last_partial_chunk
def can_connect(self, header: dict, check_height: bool=True) -> bool:
def can_connect(self, header: dict, *, check_height: bool = True) -> bool:
if header is None:
return False
height = header['block_height']