Page MenuHomePhabricator

Mark -uahfstarttime parameter as deprecated and issue a log warning if set to anything other than default
ClosedPublic

Authored by CCulianu on Aug 23 2017, 09:18.

Details

Summary

As per Thomas Zander's suggestion, this parameter should ideally be disabled altogether. However we can't really easily get rid of it as a lot of our python rpc tests make use of it to selectively test pre and post fork behavior. So, I decided to just say in the help that this parameter is deprecated and print a log warning if it's set to anything other than the default. This way perhaps if some day in the future we get a bug report, we can at least see in the log if they forced UAHF activation to some non-standard time.

Test Plan
make check
cd qa/pull-tester && ./rpc-tests.py -extended

Also try running ...

bitcoind -uahfstarttime=12345 -printtoconsole

... and look at the log messages. Should get a warning.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
uahfargfix
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 745
Build 745: arc lint + arc unit

Event Timeline

Assert was in the wrong place.

This revision is now accepted and ready to land.Aug 23 2017, 09:59

Hmm, sorry, this platform is confusing. I only now see the full diff... (the previous comment was regarding the assert).

I have an idea that may be useful.

As far as I know all of the RPC tests start bitcoind in -regtest mode. So maybe a better solution is that you check Params().NetworkIDString() == CBaseChainParams::REGTEST and allow changes there.
Then you can simply ignore the parameter completely on any other networks.

This revision was automatically updated to reflect the committed changes.