• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bitcoindevkit / bdk / 10780328230
79%

Build:
DEFAULT BRANCH: master
Ran 09 Sep 2024 08:04PM UTC
Jobs 1
Files 48
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Sep 2024 07:58PM UTC coverage: 81.732% (+0.002%) from 81.73%
10780328230

push

github

notmandatory
Merge bitcoindevkit/bdk#1586: Change methods of `IndexedTxGraph`/`TxGraph`/`Wallet` that insert txs to be more generic

87e61212f feat(chain,wallet)!: change methods to take in generic instead of `&Transaction` (志宇)
c39284d82 feat(wallet): make `Wallet::insert_tx` generic (志宇)
67d5fa695 feat(chain): make various insert tx methods more generic (志宇)

Pull request description:

  ### Description

  We want to reuse the `Arc` pointer whenever possible. However, some methods on `TxGraph` and `IndexedTxGraph` that insert transactions take in `&Transaction` or `Transaction` (thus forcing us to create a new `Arc<Transaction>` internally by cloning, even if the input tx is under a `Arc`).

  This PR changes these methods to take in a generic parameter, `T: Into<Arc<Transaction>>`, allowing us to reuse the `Arc` pointer whenever possible.

  ### Notes to the reviewers

  Methods that previously took in `Transaction` can be changed to take in `T: Into<Arc<Transaction>>` and be non-breaking (since `Arc<T>` impls `From<T>` automatically). These changes are contained in the first two commits.

  Methods that previously took in `&Transaction` will break. However, I think these api changes are small and the improvements are substantial enough to be worth it. These changes are contained in the last commit.

  ### Changelog notice

  * Changed `IndexedTxGraph` methods `insert_tx`, `batch_insert_relevant`, `batch_insert_relevant_unconfirmed`, `batch_insert_unconfirmed` to take in `T: Into<Arc<Transaction>>` instead of `Transaction` or `&Transaction`.
  * Changed `TxGraph` method `batch_insert_unconfirmed` to take in `T: Into<Arc<Transaction>>` instead of `Transaction`.
  * Changed `Wallet` methods `insert_tx`, `apply_unconfirmed_txs` to take in `T: Into<Arc<Transaction>>` instead of `Transaction` or `&Transaction`.

  ### Checklists

  #### All Submissions:

  * [x] I've signed ... (continued)

27 of 29 new or added lines in 3 files covered. (93.1%)

11100 of 13581 relevant lines covered (81.73%)

13590.48 hits per line

Jobs
ID Job ID Ran Files Coverage
1 10780328230.1 09 Sep 2024 08:04PM UTC 0
81.73
GitHub Action Run
Source Files on build 10780328230
Detailed source file information is not available for this build.
  • Back to Repo
  • 87606533 on github
  • Prev Build on master (#10780014759)
  • Next Build on master (#10813422573)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc