Page MenuHomePhabricator

[avalanche] Add an easy to use shortcut flag to turn on avalanche
ClosedPublic

Authored by Fabien on Apr 14 2022, 12:36.

Details

Summary

This is a convenience flag, which still let the user override the flags he wants. This depends on D11358 for the min stake amount to work properly. There is no change in behavior when the flag is not set.

Test Plan
ninja check-avalanche

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Apr 14 2022, 12:36

Everything looks correctly implemented and the logic all makes sense, except I'm not clear on the reasoning about the quorum params.

src/init.cpp
1758 ↗(On Diff #33223)

What is the logic behind settings these 2 quorum params to these hardcoded values if -avalanche is set, but the constant-based defaults if it's not set?

Fabien planned changes to this revision.Apr 19 2022, 07:26
Fabien added inline comments.
src/init.cpp
1758 ↗(On Diff #33223)

This is such that if you want to change the default, the tests needs to be adapted accordingly and you are not silently ignoring the change. But you are missing the elephant in the room on the line below: if -ecash is unset, we are using a value 1000000 times too large.

Don't rely on Currency for the minimal amount

This revision is now accepted and ready to land.Apr 20 2022, 13:35