Page MenuHomePhabricator

[avalanche] Reduce scope of block tips being checked in avalanche voting test
ClosedPublic

Authored by sdulfari on Feb 21 2023, 19:55.

Details

Summary

This patch makes more explicit which tip is being tested for avalanche acceptance. Keeping track of the outer-scoped hash_tip variables leads to headaches when making changes to this file.

Test Plan
ninja && ./test/functional/test_runner.py abc_p2p_avalanche_voting

Diff Detail

Event Timeline

Cleanup unnecessary check against getbestblockhash

Fabien requested changes to this revision.Feb 21 2023, 21:14
Fabien added a subscriber: Fabien.
Fabien added inline comments.
test/functional/abc_p2p_avalanche_voting.py
213 ↗(On Diff #37968)

That is super confusing !

Please don't return the function but simply use a lambda here:
self.wait_until(lambda: has_finalized_tip(fork_tip))
and remove the inner check() altogether

227 ↗(On Diff #37968)

Nit: using getchaintips to actually check the block is parked would be more accurate

232 ↗(On Diff #37968)

Same, please use a lambda; this is super confusing

252 ↗(On Diff #37968)

dito

262 ↗(On Diff #37968)

dito

This revision now requires changes to proceed.Feb 21 2023, 21:14
This revision is now accepted and ready to land.Feb 22 2023, 09:23