@@ -79,7 +79,7 @@ enum OnchainEvent {
79
79
/// Outpoint under claim process by our own tx, once this one get enough confirmations, we remove it from
80
80
/// bump-txn candidate buffer.
81
81
Claim {
82
- claim_request : Txid ,
82
+ package_id : PackageID ,
83
83
} ,
84
84
/// Claim tx aggregate multiple claimable outpoints. One of the outpoint may be claimed by a counterparty party tx.
85
85
/// In this case, we need to drop the outpoint and regenerate a new claim tx. By safety, we keep tracking
@@ -123,7 +123,7 @@ impl MaybeReadable for OnchainEventEntry {
123
123
124
124
impl_writeable_tlv_based_enum_upgradable ! ( OnchainEvent ,
125
125
( 0 , Claim ) => {
126
- ( 0 , claim_request , required) ,
126
+ ( 0 , package_id , required) ,
127
127
} ,
128
128
( 1 , ContentiousOutpoint ) => {
129
129
( 0 , package, required) ,
@@ -480,8 +480,8 @@ impl<ChannelSigner: Sign> OnchainTxHandler<ChannelSigner> {
480
480
// We check for outpoint spends within claims individually rather than as a set
481
481
// since requests can have outpoints split off.
482
482
if !self . onchain_events_awaiting_threshold_conf . iter ( )
483
- . any ( |event_entry| if let OnchainEvent :: Claim { claim_request } = event_entry. event {
484
- first_claim_txid_height. 0 == claim_request . into_inner ( )
483
+ . any ( |event_entry| if let OnchainEvent :: Claim { package_id } = event_entry. event {
484
+ first_claim_txid_height. 0 == package_id
485
485
} else {
486
486
// The onchain event is not a claim, keep seeking until we find one.
487
487
false
@@ -766,7 +766,7 @@ impl<ChannelSigner: Sign> OnchainTxHandler<ChannelSigner> {
766
766
txid: tx. txid( ) ,
767
767
height: conf_height,
768
768
block_hash: Some ( conf_hash) ,
769
- event: OnchainEvent :: Claim { claim_request : Txid :: from_inner ( first_claim_txid_height. 0 ) }
769
+ event: OnchainEvent :: Claim { package_id : first_claim_txid_height. 0 }
770
770
} ;
771
771
if !self . onchain_events_awaiting_threshold_conf. contains( & entry) {
772
772
self . onchain_events_awaiting_threshold_conf. push( entry) ;
@@ -821,13 +821,13 @@ impl<ChannelSigner: Sign> OnchainTxHandler<ChannelSigner> {
821
821
for entry in onchain_events_awaiting_threshold_conf {
822
822
if entry. has_reached_confirmation_threshold ( cur_height) {
823
823
match entry. event {
824
- OnchainEvent :: Claim { claim_request } => {
825
- let package_id = claim_request. into_inner ( ) ;
824
+ OnchainEvent :: Claim { package_id } => {
826
825
// We may remove a whole set of claim outpoints here, as these one may have
827
826
// been aggregated in a single tx and claimed so atomically
828
827
if let Some ( request) = self . pending_claim_requests . remove ( & package_id) {
829
828
for outpoint in request. outpoints ( ) {
830
- log_debug ! ( logger, "Removing claim tracking for {} due to maturation of claim tx {}." , outpoint, claim_request) ;
829
+ log_debug ! ( logger, "Removing claim tracking for {} due to maturation of claim tx {}." ,
830
+ outpoint, log_bytes!( package_id) ) ;
831
831
self . claimable_outpoints . remove ( & outpoint) ;
832
832
#[ cfg( anchors) ]
833
833
self . pending_claim_events . remove ( & package_id) ;
0 commit comments