Page MenuHomePhabricator

Add support to disable the hard fork
AbandonedPublic

Authored by dagurval on Jul 13 2017, 18:14.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Summary

From spec:
If the activation time is configured to 0, the client shall not enforce
the new consensus rules of UAHF, including the activation of the fork,
the size constraint at a certain time, and the enforcing of EB/AD
constraints at startup.

Add unit tests for 'IsUAHFenabled'

Test Plan

Covered by unittests

Diff Detail

Repository
rABC Bitcoin ABC
Branch
disable-hardfork
Lint
Lint Passed
SeverityLocationCodeMessage
Auto-Fixsrc/validation.cpp:1CFMTCode style violation
Unit
No Test Coverage
Build Status
Buildable 497
Build 497: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Jul 13 2017, 18:14
deadalnix added inline comments.
src/test/validation_tests.cpp
94

I think you should just pile on several CBlockIndex . Other tests do that and it avoid the need for making GetMedianTimePast virtual.

src/validation.cpp
1

arc must have complained about this.

I think there will be an overlap with D310 (Sign using replay protection by default in raw transaction RPC).

Generally, I think if the user cancels his HF by setting the value to 0, this should prevent his client from making protected transactions.

Also, setuahfstarttime validation needs to be adapted to allow the user to set to the special value 0 .

src/test/validation_tests.cpp
94

I don't really care to test GetMedianTimePast here. This way is much simpler to read/write the test. Is the trade-off of keeping the method non-virtual worth it?