@@ -167,7 +167,6 @@ pub struct OnchainTxHandler<ChannelSigner: Sign> {
167
167
168
168
onchain_events_awaiting_threshold_conf : Vec < OnchainEventEntry > ,
169
169
170
- latest_height : u32 ,
171
170
172
171
pub ( super ) secp_ctx : Secp256k1 < secp256k1:: All > ,
173
172
}
@@ -222,7 +221,6 @@ impl<ChannelSigner: Sign> OnchainTxHandler<ChannelSigner> {
222
221
}
223
222
}
224
223
}
225
- self . latest_height . write ( writer) ?;
226
224
227
225
write_tlv_fields ! ( writer, { } , { } ) ;
228
226
Ok ( ( ) )
@@ -289,7 +287,6 @@ impl<'a, K: KeysInterface> ReadableArgs<&'a K> for OnchainTxHandler<K::Signer> {
289
287
} ;
290
288
onchain_events_awaiting_threshold_conf. push ( OnchainEventEntry { txid, height, event } ) ;
291
289
}
292
- let latest_height = Readable :: read ( reader) ?;
293
290
294
291
read_tlv_fields ! ( reader, { } , { } ) ;
295
292
@@ -307,7 +304,6 @@ impl<'a, K: KeysInterface> ReadableArgs<&'a K> for OnchainTxHandler<K::Signer> {
307
304
claimable_outpoints,
308
305
pending_claim_requests,
309
306
onchain_events_awaiting_threshold_conf,
310
- latest_height,
311
307
secp_ctx,
312
308
} )
313
309
}
@@ -326,7 +322,6 @@ impl<ChannelSigner: Sign> OnchainTxHandler<ChannelSigner> {
326
322
pending_claim_requests : HashMap :: new ( ) ,
327
323
claimable_outpoints : HashMap :: new ( ) ,
328
324
onchain_events_awaiting_threshold_conf : Vec :: new ( ) ,
329
- latest_height : 0 ,
330
325
331
326
secp_ctx,
332
327
}
@@ -370,15 +365,11 @@ impl<ChannelSigner: Sign> OnchainTxHandler<ChannelSigner> {
370
365
/// for this channel, provide new relevant on-chain transactions and/or new claim requests.
371
366
/// Formerly this was named `block_connected`, but it is now also used for claiming an HTLC output
372
367
/// if we receive a preimage after force-close.
373
- pub ( crate ) fn update_claims_view < B : Deref , F : Deref , L : Deref > ( & mut self , txn_matched : & [ & Transaction ] , requests : Vec < PackageTemplate > , latest_height : Option < u32 > , broadcaster : & B , fee_estimator : & F , logger : & L )
368
+ pub ( crate ) fn update_claims_view < B : Deref , F : Deref , L : Deref > ( & mut self , txn_matched : & [ & Transaction ] , requests : Vec < PackageTemplate > , height : u32 , broadcaster : & B , fee_estimator : & F , logger : & L )
374
369
where B :: Target : BroadcasterInterface ,
375
370
F :: Target : FeeEstimator ,
376
371
L :: Target : Logger ,
377
372
{
378
- let height = match latest_height {
379
- Some ( h) => h,
380
- None => self . latest_height ,
381
- } ;
382
373
log_trace ! ( logger, "Updating claims view at height {} with {} matched transactions and {} claim requests" , height, txn_matched. len( ) , requests. len( ) ) ;
383
374
let mut preprocessed_requests = Vec :: with_capacity ( requests. len ( ) ) ;
384
375
let mut aggregated_request = None ;
0 commit comments