diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-03-01 15:33:52 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-03-01 15:34:05 -0500 |
commit | 54a7ef612a3b69984d521432f8a694a682c76090 (patch) | |
tree | 13004adb153060fe957b54a0f18f3e03c2228a00 /src/test/util | |
parent | 715dbbe9e8b64fd4b556a0b0720b44d68c3b5e32 (diff) | |
parent | 10efc0487c442bccb0e4a9ac29452af1592a3cf2 (diff) |
Merge #17399: validation: Templatize ValidationState instead of subclassing
10efc0487c442bccb0e4a9ac29452af1592a3cf2 Templatize ValidationState instead of subclassing (Jeffrey Czyz)
10e85d4adc9b7dbbda63e00195e0a962f51e4d2c Remove ValidationState's constructor (Jeffrey Czyz)
0aed17ef2892478c28cd660e53223c6dd1dc0187 Refactor FormatStateMessage into ValidationState (Jeffrey Czyz)
Pull request description:
This removes boilerplate code in the subclasses which otherwise only
differ by the result type.
The subclassing was introduced in a27a295.
ACKs for top commit:
MarcoFalke:
ACK 10efc0487c442bccb0e4a9ac29452af1592a3cf2 🐱
ajtowns:
ACK 10efc0487c442bccb0e4a9ac29452af1592a3cf2 -- looks good to me
jonatack:
ACK 10efc048 code review, build/tests green, nice cleanup
Tree-SHA512: 765dd52dde7d49b9a5c6d99d97c96f4492673e2aed0b0604faa88db0308fa4500a26bf755cca0b896be283874096c215932e1110a2d01dc012cd36a5fce58a42
Diffstat (limited to 'src/test/util')
-rw-r--r-- | src/test/util/setup_common.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp index 360377e58a..fc736bc3a1 100644 --- a/src/test/util/setup_common.cpp +++ b/src/test/util/setup_common.cpp @@ -25,7 +25,6 @@ #include <util/strencodings.h> #include <util/time.h> #include <util/translation.h> -#include <util/validation.h> #include <validation.h> #include <validationinterface.h> @@ -123,7 +122,7 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha BlockValidationState state; if (!ActivateBestChain(state, chainparams)) { - throw std::runtime_error(strprintf("ActivateBestChain failed. (%s)", FormatStateMessage(state))); + throw std::runtime_error(strprintf("ActivateBestChain failed. (%s)", state.ToString())); } // Start script-checking threads. Set g_parallel_script_checks to true so they are used. |