Page MenuHomePhabricator

[refactor] set the -ecash CLI argument earlier in startup
ClosedPublic

Authored by majcosta on Wed, Jun 9, 20:09.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCb48da90d1e72: [refactor] set the -ecash CLI argument earlier in startup
Summary

init.cpp isn't executed for bitcoin-tx, for example, which also needs the -ecash switch available

Test Plan
ninja all check-all

Diff Detail

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

Event Timeline

majcosta requested review of this revision.Wed, Jun 9, 20:09
Fabien requested changes to this revision.Thu, Jun 10, 06:56
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/chainparamsbase.cpp
34 ↗(On Diff #28828)

Like I pointed out in D9652 this is not a chain param. You don't end up on another chain by turning this switch on or off. BTW the category reflects that.

This revision now requires changes to proceed.Thu, Jun 10, 06:56

do not set the parameter in an inappropriate function, create a compilation unit for currency unit related code

missing newline at end of file

Fabien requested changes to this revision.Thu, Jun 10, 08:31
Fabien added inline comments.
src/currencyunit.cpp
11 ↗(On Diff #28832)

Turn the false default into a constant so you have a single place to edit when making it the default

src/currencyunit.h
10 ↗(On Diff #28832)

give the param a name

This revision now requires changes to proceed.Thu, Jun 10, 08:31
Fabien added inline comments.
src/currencyunit.cpp
12 ↗(On Diff #28833)

Nit: Default => default

This revision is now accepted and ready to land.Thu, Jun 10, 09:05