Skip to content

Commit

Permalink
test: fancier Python for getblockfrompeer
Browse files Browse the repository at this point in the history
Co-authored-by: MarcoFalke <[email protected]>
  • Loading branch information
Sjors and MarcoFalke committed Dec 9, 2021
1 parent 529ed33 commit bfbf91d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions test/functional/rpc_getblockfrompeer.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,8 @@ def run_test(self):
self.sync_blocks()

self.log.info("Node 0 should only have the header for node 1's block 3")
for x in self.nodes[0].getchaintips():
if x['hash'] == short_tip:
assert_equal(x['status'], "headers-only")
break
else:
raise AssertionError("short tip not synced")
x = next(filter(lambda x: x['hash'] == short_tip, self.nodes[0].getchaintips()))
assert_equal(x['status'], "headers-only")
assert_raises_rpc_error(-1, "Block not found on disk", self.nodes[0].getblock, short_tip)

self.log.info("Fetch block from node 1")
Expand Down

0 comments on commit bfbf91d

Please sign in to comment.