Page MenuHomePhabricator

Use Median Past Time for HF activation
ClosedPublic

Authored by deadalnix on Jun 13 2017, 19:42.

Details

Summary

For all intent and purpose they are the same as long as CSV is activated, which it has been for ages. For it is different when running integration tests as CSV is not activated there.

Plus the spec specify MPT so we should use that.

Test Plan
make check

Diff Detail

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

Event Timeline

Fix BlockPastTime => BlockTimePast

Add missing null check :/

Rename nBlockTime to nMedianTimePast in script_antireplay_tests.cpp because it's more accurate.

Looks good to me, tests passed and I couldn't find meaningful cases missing.

I will open an issue for revisiting test suite vs. filename consistency in the unit tests - this is an area which causes me grief when trying to run test cases but the suite name is not what I'd expect from the filename.

src/test/script_antireplay_tests.cpp
18 ↗(On Diff #468)

Please rename the "antireplay_tests" here to be consistent with the filename.

It makes it much easier to just see from the filenames what the suites are called, making it easy to script a run of certain tests just based on filename matching.

In BU I went over all the tests to ensure this consistency, which was missing in Core (and still is, afaik). This can be fixed up later in a consistency makeover of the test suite.

Just bear in mind if you write future tests. then less work for later.

76 ↗(On Diff #468)

Suggest to rename to nSunsetHeight or similar which would make reading the test cases much easier.

77 ↗(On Diff #468)

Suggest to rename to nStartTime to make the test cases here easier to follow.

This revision is now accepted and ready to land.Jun 14 2017, 20:12

Update names as per request

This revision was automatically updated to reflect the committed changes.