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

Adaptations in Weight Calculation Methods #2

Merged
merged 1 commit into from
Dec 9, 2023
Merged

Adaptations in Weight Calculation Methods #2

merged 1 commit into from
Dec 9, 2023

Conversation

landabaso
Copy link
Member

This update ensure that @bitcoinerlab/coinselect takes full advantage of the recent improvements in the @bitcoinerlab/descriptors package, particularly the new weight calculation methods. This alignment enhances the performance of coin selection and transaction size estimation since it now relies on smarter caching strategies implemented in @bitcoinerlab/descriptors.

It aligns with the recent enhancements and new functionalities in weight calculation methods introduced in @bitcoinerlab/descriptors (PR #32).

Key Changes:

  1. Package Version and Dependencies:

    • Upgraded @bitcoinerlab/coinselect from version 1.1.0 to 1.2.0.
    • Updated the dependency on @bitcoinerlab/descriptors to version 2.1.0 to leverage the latest enhancements.
  2. Code Refactoring:

    • Removed local implementations of weight calculations (inputWeight and outputWeight) and replaced them with the updated methods from @bitcoinerlab/descriptors.
    • Simplified and streamlined the code by removing redundant functions and logic, relying on the improved functionalities in the descriptors package.
  3. Validation and Dust Calculation Adjustments:

    • Updated the validation logic to incorporate changes in dust calculation and fee rate validation.
    • Ensured compatibility with the new weight calculation methods in handling UTXOs and transaction outputs.
  4. Test Suite Enhancements:

    • Revised test cases to align with the updated logic and methods.

Updates and modifications have been appropriately commented and documented within the code.

This update ensure that `@bitcoinerlab/coinselect` takes full advantage of the recent improvements in the `@bitcoinerlab/descriptors` package, particularly the new weight calculation methods. This alignment enhances the performance of coin selection and transaction size estimation since it now relies on smarter caching strategies implemented in `@bitcoinerlab/descriptors`.

It aligns with the recent enhancements and new functionalities in weight calculation methods introduced in `@bitcoinerlab/descriptors` ([PR #32](bitcoinerlab/descriptors#32)).

**Key Changes:**
1. **Package Version and Dependencies:**
   - Upgraded `@bitcoinerlab/coinselect` from version `1.1.0` to `1.2.0`.
   - Updated the dependency on `@bitcoinerlab/descriptors` to version `2.1.0` to leverage the latest enhancements.

2. **Code Refactoring:**
   - Removed local implementations of weight calculations (`inputWeight` and `outputWeight`) and replaced them with the updated methods from `@bitcoinerlab/descriptors`.
   - Simplified and streamlined the code by removing redundant functions and logic, relying on the improved functionalities in the `descriptors` package.

3. **Validation and Dust Calculation Adjustments:**
   - Updated the validation logic to incorporate changes in dust calculation and fee rate validation.
   - Ensured compatibility with the new weight calculation methods in handling UTXOs and transaction outputs.

4. **Test Suite Enhancements:**
   - Revised test cases to align with the updated logic and methods.

Updates and modifications have been appropriately commented and documented within the code.
@landabaso landabaso merged commit b568bf8 into main Dec 9, 2023
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.

1 participant