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

backport: Merge bitcoin#23712 , 23346 #6308

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

vijaydasmp
Copy link

bitcoin backports

@vijaydasmp vijaydasmp changed the title backport Merge bitcoin#23712 , 23515 backport: Merge bitcoin#23712 , 23515 Nov 25, 2024
@vijaydasmp vijaydasmp changed the title backport: Merge bitcoin#23712 , 23515 backport: Merge bitcoin#23712 Nov 25, 2024
Copy link

This pull request has conflicts, please rebase.

Copy link

This pull request has conflicts, please rebase.

@vijaydasmp vijaydasmp changed the title backport: Merge bitcoin#23712 backport: Merge bitcoin#23712 , 23346, 23120, 23640, 22008, 22100 Nov 27, 2024
@vijaydasmp vijaydasmp force-pushed the bp23_2024_10_05 branch 3 times, most recently from 34e0c08 to a1d6b20 Compare December 30, 2024 13:30
@vijaydasmp vijaydasmp changed the title backport: Merge bitcoin#23712 , 23346, 23120, 23640, 22008, 22100 backport: Merge bitcoin#23712 , 23346, 23120, 23640, 22008 Dec 30, 2024
@vijaydasmp vijaydasmp changed the title backport: Merge bitcoin#23712 , 23346, 23120, 23640, 22008 backport: Merge bitcoin#23712 , 23346, 23120, 23640, 22008, 22100 Dec 30, 2024
@vijaydasmp vijaydasmp force-pushed the bp23_2024_10_05 branch 7 times, most recently from d54db04 to 0644cde Compare January 3, 2025 06:29
Copy link

This pull request has conflicts, please rebase.

MarcoFalke added 2 commits January 15, 2025 17:22
…wallet type availability

b57bf25 test: interface_bitcoin_cli.py: check specified wallet type availability (Sebastian Falbesoner)

Pull request description:

  Currently the test `interface_bitcoin_cli.py` performs the wallet-relevant parts if _any_ wallet type support is compiled in, independently of
  whether the test is run with legacy or descriptor wallet specified. This leads to a failure if the test is started with the `--legacy-wallet` parameter, but bitcoind is compiled without BDB support, see e.g
   bitcoin#23686 (comment)

  Fix this by checking if the specified wallet type (BDB for legacy wallet, SQLite for descriptor wallet) is available.

  Should further pave the way for bitcoin#23682.

ACKs for top commit:
  achow101:
    ACK b57bf25

Tree-SHA512: ddb5a94ba61133eff8de79d4946b3b9d476232b26e83bf768894cac4691e72602f88b6c02c72b992e12c2feb9bff1f0a2e0a265948a00954311104add1347184
…et tool

3431839 util, refactor: Improve headers for bitcoin-wallet tool (Hennadii Stepanov)

Pull request description:

  This PR:
  - removes unneeded `#include <wallet/wallet.h>` from `<wallet/wallettool.h>`
  - introduces class forward declaration in `<wallet/wallettool.h>`
  - added `#include <config/bitcoin-config.h>` to `wallet/wallettool.cpp` where the `USE_BDB` macro is used

Top commit has no ACKs.

Tree-SHA512: a0de560d821f8b570ae806a1165b9b382c9e0b339687d932052fa4c38ab2ba493e7e050f19adc02ad7db40c42cf88ac1d37209f9071494a0ab268ed33ff22b9f
@vijaydasmp vijaydasmp changed the title backport: Merge bitcoin#23712 , 23346, 23120, 23640, 22008, 22100 backport: Merge bitcoin#23712 , 23346, 23640 Jan 15, 2025
@vijaydasmp vijaydasmp changed the title backport: Merge bitcoin#23712 , 23346, 23640 backport: Merge bitcoin#23712 , 23346 Jan 15, 2025
@vijaydasmp vijaydasmp marked this pull request as ready for review January 19, 2025 04:05
Copy link

coderabbitai bot commented Jan 19, 2025

Walkthrough

The pull request introduces a series of modifications across multiple files in the Bitcoin codebase, primarily focusing on header file inclusions and minor structural adjustments. In src/bitcoin-wallet.cpp, several new header files are added, expanding potential library capabilities for client versioning, key management, and error handling. The src/wallet/wallettool.cpp file includes a configuration header conditionally, while src/wallet/wallettool.h removes the WalletShowInfo function and adds a forward declaration for ArgsManager. The functional test file test/functional/interface_bitcoin_cli.py introduces a new method is_specified_wallet_compiled to centralize wallet compilation checking logic. These changes appear to be preparatory modifications that enhance code modularity and library access without significantly altering the core functionality of the existing components.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e7cac98 and 321a21a.

📒 Files selected for processing (4)
  • src/bitcoin-wallet.cpp (1 hunks)
  • src/wallet/wallettool.cpp (1 hunks)
  • src/wallet/wallettool.h (1 hunks)
  • test/functional/interface_bitcoin_cli.py (3 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/wallet/wallettool.cpp
🔇 Additional comments (4)
src/wallet/wallettool.h (1)

8-10: LGTM: Clean header organization.

The addition of <string> header and forward declaration of ArgsManager improves header organization by reducing dependencies.

src/bitcoin-wallet.cpp (1)

14-17: LGTM: Explicit header dependencies.

The addition of previously indirect header dependencies makes the requirements explicit and follows proper header organization (project headers followed by standard library headers).

Also applies to: 23-25

test/functional/interface_bitcoin_cli.py (2)

69-74: LGTM: Well-structured wallet compilation check.

The new is_specified_wallet_compiled method cleanly centralizes the wallet type checking logic based on descriptor/legacy wallet configuration.


78-79: Verify test coverage for both wallet types.

The wallet compilation checks have been updated to use the new centralized method. Please ensure that the test suite runs with both descriptor and legacy wallet configurations to maintain complete coverage.

Also applies to: 131-132, 156-157

✅ Verification successful

Test coverage is properly maintained for both wallet types

The test suite comprehensively covers both descriptor and legacy wallet configurations through:

  • Explicit wallet type checks via is_specified_wallet_compiled()
  • Conditional test paths for wallet-specific features
  • Dedicated descriptor wallet tests
  • Proper database backend verification (sqlite/bdb)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if both wallet types are tested
rg -A 5 "def test.*wallet" test/functional/

Length of output: 7862


Script:

#!/bin/bash
# Search for descriptor/legacy wallet configuration in test files
rg -B 3 -A 3 "descriptor|legacy.*wallet" test/functional/
# Also check test configuration
rg -B 3 -A 3 "self.setup|def setup" test/functional/interface_bitcoin_cli.py

Length of output: 72168

Finishing Touches

  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK 321a21a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants