Page MenuHomePhabricator

[avalanche] Extract the facilities to the test object to simplify the abc_p2p_avalanche_proof_voting test
ClosedPublic

Authored by Fabien on Feb 11 2022, 21:12.

Details

Summary

This is a step toward splitting the test into pieces so we don't have the various cases scattered over files with redundant content.

Test Plan
./test/functional/test_runner.py abc_p2p_avalanche_proof_voting

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Feb 11 2022, 21:12
PiRK added a subscriber: PiRK.

Good refactoring overalL. I have added a few non-blocking improvement suggestions.

test/functional/abc_p2p_avalanche_proof_voting.py
81 ↗(On Diff #32352)

this could be a @staticmethod

93 ↗(On Diff #32352)

If quorum_proof is to be used only in get_quorum, I would pass is as a parameter and not add another class attribute.

This revision is now accepted and ready to land.Feb 14 2022, 14:53
test/functional/abc_p2p_avalanche_proof_voting.py
81 ↗(On Diff #32352)

OK

93 ↗(On Diff #32352)

I'm not sold on this, I just find it easy enough to have it a class attribute rather than passing it down each case that needs it because it rebuilds the quorum.