bdk/example-crates/wallet_electrum
志宇 8eef350bd0
Merge bitcoindevkit/bdk#1453: refactor(electrum) put the tx cache in electrum
2d2656acfa83ab4c4846c0aab14072efb64c5cc3 feat(electrum): re-export `transaction_broadcast` method (志宇)
53fa35096fbeea2b82b28987e8ef6f7d39ffc80b refactor(electrum)!: put the tx cache in electrum (LLFourn)

Pull request description:

  Previously there was a `TxCache` that you passed in as part of the sync request. There are lots of downsides to this:

  1. If the user forgets to do this you cache nothing
  2. where are you meant to keep this cache? The example shows it being recreated every time which seems very suboptimal.
  3. More API and documentation surface area.

  Instead just do a plain old simple cache inside the electrum client. This way at least you only download transactions once. You can pre-populate the cache with a method also and I did this in the examples.

  * [x] This pull request breaks the existing API

ACKs for top commit:
  evanlinjin:
    self-ACK 2d2656acfa83ab4c4846c0aab14072efb64c5cc3
  notmandatory:
    ACK 2d2656acfa83ab4c4846c0aab14072efb64c5cc3

Tree-SHA512: 6c29fd4f99ea5bd66234d5cdaf4b157a192ddd3baacc91076e402d8df0de7010bc482e24895e85fcb2f805ec6d1ce6cdb7654f8f552c90ba75ed35f80a00b856
2024-06-05 10:19:00 +08:00
..