@@ -52,9 +52,9 @@ use util::byte_utils;
5252use util:: events:: Event ;
5353
5454use std:: collections:: { HashMap , HashSet } ;
55- use std :: { cmp, mem} ;
55+ use core :: { cmp, mem} ;
5656use std:: io:: Error ;
57- use std :: ops:: Deref ;
57+ use core :: ops:: Deref ;
5858use std:: sync:: Mutex ;
5959
6060/// An update generated by the underlying Channel itself which contains some new information the
@@ -85,7 +85,7 @@ pub struct ChannelMonitorUpdate {
8585/// then we allow the `ChannelManager` to send a `ChannelMonitorUpdate` with this update ID,
8686/// with the update providing said payment preimage. No other update types are allowed after
8787/// force-close.
88- pub const CLOSED_CHANNEL_UPDATE_ID : u64 = std :: u64:: MAX ;
88+ pub const CLOSED_CHANNEL_UPDATE_ID : u64 = core :: u64:: MAX ;
8989
9090impl Writeable for ChannelMonitorUpdate {
9191 fn write < W : Writer > ( & self , w : & mut W ) -> Result < ( ) , :: std:: io:: Error > {
@@ -101,7 +101,7 @@ impl Readable for ChannelMonitorUpdate {
101101 fn read < R : :: std:: io:: Read > ( r : & mut R ) -> Result < Self , DecodeError > {
102102 let update_id: u64 = Readable :: read ( r) ?;
103103 let len: u64 = Readable :: read ( r) ?;
104- let mut updates = Vec :: with_capacity ( cmp:: min ( len as usize , MAX_ALLOC_SIZE / :: std :: mem:: size_of :: < ChannelMonitorUpdateStep > ( ) ) ) ;
104+ let mut updates = Vec :: with_capacity ( cmp:: min ( len as usize , MAX_ALLOC_SIZE / :: core :: mem:: size_of :: < ChannelMonitorUpdateStep > ( ) ) ) ;
105105 for _ in 0 ..len {
106106 updates. push ( Readable :: read ( r) ?) ;
107107 }
@@ -1932,7 +1932,7 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
19321932
19331933 for & ( ref htlc, _, _) in holder_tx. htlc_outputs . iter ( ) {
19341934 if let Some ( transaction_output_index) = htlc. transaction_output_index {
1935- claim_requests. push ( ClaimRequest { absolute_timelock : :: std :: u32:: MAX , aggregable : false , outpoint : BitcoinOutPoint { txid : holder_tx. txid , vout : transaction_output_index as u32 } ,
1935+ claim_requests. push ( ClaimRequest { absolute_timelock : :: core :: u32:: MAX , aggregable : false , outpoint : BitcoinOutPoint { txid : holder_tx. txid , vout : transaction_output_index as u32 } ,
19361936 witness_data : InputMaterial :: HolderHTLC {
19371937 preimage : if !htlc. offered {
19381938 if let Some ( preimage) = self . payment_preimages . get ( & htlc. payment_hash ) {
@@ -2594,7 +2594,7 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
25942594 fn is_paying_spendable_output < L : Deref > ( & mut self , tx : & Transaction , height : u32 , logger : & L ) where L :: Target : Logger {
25952595 let mut spendable_output = None ;
25962596 for ( i, outp) in tx. output . iter ( ) . enumerate ( ) { // There is max one spendable output for any channel tx, including ones generated by us
2597- if i > :: std :: u16:: MAX as usize {
2597+ if i > :: core :: u16:: MAX as usize {
25982598 // While it is possible that an output exists on chain which is greater than the
25992599 // 2^16th output in a given transaction, this is only possible if the output is not
26002600 // in a lightning transaction and was instead placed there by some third party who
0 commit comments