Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Don't depend on value of DEFAULT_PERMIT_BAREMULTISIG #29088

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

ajtowns
Copy link
Contributor

@ajtowns ajtowns commented Dec 15, 2023

Update unit and functional tests so that they continue to work if the default for -permitbaremultisig is changed.

@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 15, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK maflcko, instagibbs, glozow, achow101

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #29001 (Ephemeral Anchors by instagibbs)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@DrahtBot DrahtBot added the Tests label Dec 15, 2023
@maflcko
Copy link
Member

maflcko commented Dec 15, 2023

elay_fee, std::string& reason);
      |                                                                                                      ^
test/script_p2sh_tests.cpp:29:43: error: argument name 'permit_baremultisig' in comment does not match parameter name 'permit_bare_multisig' [bugprone-argument-comment,-warnings-as-errors]
   29 |            IsStandardTx(tx, std::nullopt, /*permit_baremultisig=*/false, CFeeRate{DUST_RELAY_TX_FEE}, reason);
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                           /*permit_bare_multisig=*/
./policy/policy.h:140:102: note: 'permit_bare_multisig' declared here
  140 | bool IsStandardTx(const CTransaction& tx, const std::optional<unsigned>& max_datacarrier_bytes, bool permit_bare_multisig, const CFeeRate& dust_relay_fee, std::string& reason);
--

The mempool_dust and mempool_sigoplimits functional tests both use bare
multisig txs, so ensure they're allowed by policy.
@maflcko
Copy link
Member

maflcko commented Dec 15, 2023

lgtm ACK 7b45744

@instagibbs
Copy link
Member

crACK 7b45744

(someone should probably switch it default false and check)

@maflcko
Copy link
Member

maflcko commented Dec 15, 2023

(someone should probably switch it default false and check)

done with

diff --git a/src/policy/policy.h b/src/policy/policy.h
index 6a7980c312..42359f12a5 100644
--- a/src/policy/policy.h
+++ b/src/policy/policy.h
@@ -36,7 +36,7 @@ static constexpr unsigned int DEFAULT_INCREMENTAL_RELAY_FEE{1000};
 /** Default for -bytespersigop */
 static constexpr unsigned int DEFAULT_BYTES_PER_SIGOP{20};
 /** Default for -permitbaremultisig */
-static constexpr bool DEFAULT_PERMIT_BAREMULTISIG{true};
+static constexpr bool DEFAULT_PERMIT_BAREMULTISIG{0};
 /** The maximum number of witness stack items in a standard P2WSH script */
 static constexpr unsigned int MAX_STANDARD_P2WSH_STACK_ITEMS{100};
 /** The maximum size in bytes of each witness stack item in a standard P2WSH script */

@ajtowns
Copy link
Contributor Author

ajtowns commented Dec 15, 2023

crACK 7b45744

(someone should probably switch it default false and check)

see also CI on #29093

Copy link
Member

@glozow glozow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 7b45744, changed default locally and all tests passed

@achow101
Copy link
Member

ACK 7b45744

@achow101 achow101 merged commit 3695ecb into bitcoin:master Dec 15, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants