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