Skip to content

Conversation

@phil-markarian
Copy link
Collaborator

@phil-markarian phil-markarian commented Sep 18, 2025

Description of Changes

Based changes on the following
bsv-blockchain/ts-sdk#343

  • Added Live Policy implmentation
  • Added mock tests to test the Live Policy implementation
  • Updated transaction.py to use Live Policy instead of SatoshisPerKilobyte
  • Made Live Policy the default model in init.py in fee_models
  • Added documentation reference to README.md and wrote documentation for live_policy

Linked Issues / Tickets

Reference any related issues or tickets, e.g. "Closes #123".

Testing Procedure

Describe the tests you've added or any testing steps you've taken.

  • I have added new unit tests
  • All tests pass locally
  • I have tested manually in my local environment

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have updated CHANGELOG.md with my changes
  • I have run the linter

- Added Live Policy implmentation
- Added mock tests to test the Live Policy implementation
- Updated transaction.py to use Live Policy instead of SatoshisPerKilobyte
- Made Live Policy the default model in __init__.py in fee_models
- Added documentation reference to README.md and wrote documentation for live_policy
@phil-markarian
Copy link
Collaborator Author

Added commits that change some of the pre-existing libraries to double check to make sure that the live policy implementation can work via async. Applied changes may not be necessary and currently being reviewed by the engineers at Yenpoint. Upon review the final committed changes may be reverted.

Enhanced the Transaction.fee() method to support synchronous usage while internally maintaining asynchronous logic. This ensures backward compatibility is not broken.

Increased the default TRANSACTION_FEE_RATE to 10 satoshis per kilobyte for more realistic fee calculations.

Updated the pytest-asyncio dependency to version 0.24.0.

Modified the LivePolicy fallback fee logic to utilize the default TRANSACTION_FEE_RATE constant, ensuring consistency across fee calculations.
- Replaced `async` logic in `live_test.py` with synchronous calls for better compatibility.
- Refactored `Transaction.fee()` to include a private helper for asynchronous fee handling.
- Updated `LivePolicy` tests to utilize `default_http_client` with mock responses.
- Improved test coverage for cache utilization and fallback scenarios.
- Removed outdated and unused code in `LivePolicy` test suite.
- Deleted outdated scripts: `create_wallet.py`, `inspect_live_policy.py`, and `live_test.py`.
- Updated `__init__.py` to reflect version 1.0.9.
- Added release notes for version 1.0.9 in `CHANGELOG.md`.
Copilot AI review requested due to automatic review settings October 3, 2025 08:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 3, 2025

Copy link
Collaborator

@ALiberalVoluntarist ALiberalVoluntarist left a comment

Choose a reason for hiding this comment

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

ok

@ALiberalVoluntarist ALiberalVoluntarist merged commit 38f7b5a into master Oct 3, 2025
8 checks passed
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.

3 participants