From 0c2bc7698feb507362ca84000fc6c2053de93ff1 Mon Sep 17 00:00:00 2001 From: Calin Culianu Date: Sun, 27 Oct 2024 12:20:09 +0200 Subject: [PATCH] Fix ninja target: check-upgrade-activated After merging of !1891 & !1894, we need to update the cmake system to properly update the ninja target `check-upgrade-activated`. It turns out that with uprade11 activated, a couple of functional tests no longer fully work due to changed node error messages and/or changes in consensus after upgrade 11. For the tests in question, we force upgrade11 to be deactivated for the tests so that the tests continue to work (they are perfectly ok as regression tests for pre-upgrade 11 parts of the chain). --- test/CMakeLists.txt | 6 +++--- test/functional/abc-wallet-standardness.py | 5 ++++- test/functional/feature_int64_cscriptnum.py | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c4bfb981a7..b98c3a1fd8 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -102,7 +102,7 @@ set(TEST_SUITE_NAME_UPGRADE_ACTIVATED "Bitcoin Cash Node functional tests with t add_functional_test_check(check-functional-upgrade-activated "Run the functional tests with the upgrade activated" - --with-upgrade10activation + --with-upgrade11activation -n "${TEST_SUITE_NAME_UPGRADE_ACTIVATED}" ) add_dependencies(check-upgrade-activated check-functional-upgrade-activated) @@ -110,7 +110,7 @@ add_dependencies(check-upgrade-activated check-functional-upgrade-activated) add_functional_test_check(check-functional-upgrade-activated-extended "Run the extended functional tests with the upgrade activated" --extended - --with-upgrade10activation + --with-upgrade11activation -n "${TEST_SUITE_NAME_UPGRADE_ACTIVATED}" ) add_dependencies(check-upgrade-activated-extended check-functional-upgrade-activated-extended) @@ -125,7 +125,7 @@ add_functional_test_check(check-functional-longeronly add_functional_test_check(check-functional-upgrade-activated-longeronly "Run the long-runtime functional tests only with the upgrade activated" - --with-upgrade10activation + --with-upgrade11activation --startfrom=${DEFAULT_EXTENDED_CUTOFF} ) diff --git a/test/functional/abc-wallet-standardness.py b/test/functional/abc-wallet-standardness.py index 53eb869e86..bb62471a15 100755 --- a/test/functional/abc-wallet-standardness.py +++ b/test/functional/abc-wallet-standardness.py @@ -37,7 +37,10 @@ class WalletStandardnessTest(BitcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 2 - self.extra_args = [['-acceptnonstdtxn=0'], ['-acceptnonstdtxn=1']] + # We must ensure upgrade11 is not activated because it affects standardness and error messaging and this test + # has not been yet updated to test pre and post upgrade11. + no_upgrade11 = "-upgrade11activationtime=9999999999" + self.extra_args = [[no_upgrade11, '-acceptnonstdtxn=0'], [no_upgrade11, '-acceptnonstdtxn=1']] def skip_test_if_missing_module(self): self.skip_if_no_wallet() diff --git a/test/functional/feature_int64_cscriptnum.py b/test/functional/feature_int64_cscriptnum.py index 1f218c3a83..03fda22a06 100755 --- a/test/functional/feature_int64_cscriptnum.py +++ b/test/functional/feature_int64_cscriptnum.py @@ -66,7 +66,8 @@ def set_test_params(self): self.block_heights = {} self.extra_args = [ # Node0 has bigint64 activated (activates at upgrade8) - ["-acceptnonstdtxn=1", "-expire=0"], + # It must also have upgrade11 disabled (ints past 64-bits must be disabled for these tests) + ["-acceptnonstdtxn=1", "-expire=0", "-upgrade11activationtime=9999999999"], ] def bootstrap_p2p(self, *, num_connections=1):