@@ -501,17 +501,16 @@ impl<E: ElectrumApi> BdkElectrumClient<E> {
501
501
if let Some ( anchor) = anchor_cache. get ( & ( txid, hash) ) {
502
502
results. push ( ( txid, * anchor) ) ;
503
503
} else {
504
- to_fetch. push ( ( txid, height, hash ) ) ;
504
+ to_fetch. push ( ( txid, height) ) ;
505
505
}
506
506
}
507
507
}
508
508
509
509
// Fetch merkle proofs.
510
- let txids_and_heights = to_fetch. iter ( ) . map ( |& ( txid, height, _) | ( txid, height) ) ;
511
- let proofs = self . inner . batch_transaction_get_merkle ( txids_and_heights) ?;
510
+ let proofs = self . inner . batch_transaction_get_merkle ( to_fetch. iter ( ) ) ?;
512
511
513
512
// Validate each proof, retrying once for each stale header.
514
- for ( ( txid, height, hash ) , proof) in to_fetch. into_iter ( ) . zip ( proofs. into_iter ( ) ) {
513
+ for ( ( txid, height) , proof) in to_fetch. into_iter ( ) . zip ( proofs. into_iter ( ) ) {
515
514
let mut header = {
516
515
let cache = self . block_header_cache . lock ( ) . unwrap ( ) ;
517
516
cache
@@ -536,6 +535,7 @@ impl<E: ElectrumApi> BdkElectrumClient<E> {
536
535
537
536
// Build and cache the anchor if merkle proof is valid.
538
537
if valid {
538
+ let hash = header. block_hash ( ) ;
539
539
let anchor = ConfirmationBlockTime {
540
540
confirmation_time : header. time as u64 ,
541
541
block_id : BlockId {
0 commit comments