Merge bitcoindevkit/bdk#1453: refactor(electrum) put the tx cache in electrum
2d2656acfafeat(electrum): re-export `transaction_broadcast` method (志宇)53fa35096frefactor(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-ACK2d2656acfanotmandatory: ACK2d2656acfaTree-SHA512: 6c29fd4f99ea5bd66234d5cdaf4b157a192ddd3baacc91076e402d8df0de7010bc482e24895e85fcb2f805ec6d1ce6cdb7654f8f552c90ba75ed35f80a00b856
This commit is contained in:
@@ -2497,7 +2497,6 @@ impl Wallet {
|
||||
/// start a blockchain sync with a spk based blockchain client.
|
||||
pub fn start_sync_with_revealed_spks(&self) -> SyncRequest {
|
||||
SyncRequest::from_chain_tip(self.chain.tip())
|
||||
.cache_graph_txs(self.tx_graph())
|
||||
.populate_with_revealed_spks(&self.indexed_graph.index, ..)
|
||||
}
|
||||
|
||||
@@ -2511,7 +2510,6 @@ impl Wallet {
|
||||
/// in which the list of used scripts is not known.
|
||||
pub fn start_full_scan(&self) -> FullScanRequest<KeychainKind> {
|
||||
FullScanRequest::from_keychain_txout_index(self.chain.tip(), &self.indexed_graph.index)
|
||||
.cache_graph_txs(self.tx_graph())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user