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

Add finish related error #508

Merged
merged 1 commit into from
Apr 26, 2024
Merged

Conversation

reez
Copy link
Collaborator

@reez reez commented Apr 22, 2024

Description

finish Error using PersistBackend

Notes to the reviewers

Changelog notice

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

@reez reez self-assigned this Apr 23, 2024
@reez reez force-pushed the alphathree-fin branch 6 times, most recently from 45c682f to bb1f1c8 Compare April 25, 2024 22:00
@reez reez marked this pull request as ready for review April 25, 2024 22:51
@reez reez requested a review from thunderbiscuit April 25, 2024 22:51
Copy link

coderabbitai bot commented Apr 25, 2024

Walkthrough

This update introduces a new error handling interface, CreateTxError, across several files in bdk-ffi. It replaces Alpha3Error in transaction creation scenarios, improving the specificity and clarity of error messages related to transaction management in Bitcoin development kits.

Changes

Files Change Summary
bdk-ffi/src/.../bdk.udl Introduced CreateTxError interface; updated TxBuilder to throw CreateTxError.
bdk-ffi/src/error.rs Refactored CreateTxError enum; added variants and improved error messages.
bdk-ffi/src/lib.rs Added CreateTxError to imported error types.
bdk-ffi/src/wallet.rs Updated error handling to use CreateTxError instead of Alpha3Error.

Possibly related issues

  • Implement basic spending policy APIs #80: The changes in error handling could support more robust implementations of spending policy APIs by improving error feedback during transaction creation. This aligns with the issue's objective to enhance API functionality and reliability.

Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 282fcfc and e609b57.
Files selected for processing (4)
  • bdk-ffi/src/bdk.udl (2 hunks)
  • bdk-ffi/src/error.rs (6 hunks)
  • bdk-ffi/src/lib.rs (1 hunks)
  • bdk-ffi/src/wallet.rs (4 hunks)
Additional comments not posted (6)
bdk-ffi/src/lib.rs (1)

23-23: The addition of CreateTxError aligns well with the PR's objectives to enhance error handling in the transaction creation process.

bdk-ffi/src/bdk.udl (1)

54-78: Introduction of CreateTxError with detailed categorization and the update to TxBuilder to use this new error type are significant improvements in error granularity and handling.

bdk-ffi/src/wallet.rs (1)

Line range hint 492-540: Updating the TxBuilder to use CreateTxError for error handling in transaction-related functionalities enhances error specificity and aligns with the library's new error handling strategy.

bdk-ffi/src/error.rs (3)

67-134: The addition of the CreateTxError enum with detailed error variants enhances the clarity and specificity of error reporting in transaction creation processes.


434-487: The implementation of the From trait for CreateTxError is correctly handling the conversion from BdkCreateTxError, ensuring that error information is preserved and appropriately formatted.


490-497: The From trait implementation for converting AddUtxoError to CreateTxError is correctly handled, ensuring that specific error details are not lost in the conversion process.


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:

Note: Auto-reply has been disabled for this repository by the repository owner. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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
Member

@thunderbiscuit thunderbiscuit left a comment

Choose a reason for hiding this comment

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

ACK e609b57.

@thunderbiscuit thunderbiscuit merged commit e609b57 into bitcoindevkit:master Apr 26, 2024
25 checks passed
@reez reez deleted the alphathree-fin branch April 26, 2024 19:37
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