@@ -33,7 +33,6 @@ use util::config::{UserConfig,ChannelConfig};
33
33
use std;
34
34
use std:: default:: Default ;
35
35
use std:: { cmp, mem} ;
36
- use std:: time:: Instant ;
37
36
use std:: sync:: { Arc } ;
38
37
39
38
#[ cfg( test) ]
@@ -133,14 +132,13 @@ struct OutboundHTLCOutput {
133
132
134
133
/// See AwaitingRemoteRevoke ChannelState for more info
135
134
enum HTLCUpdateAwaitingACK {
136
- AddHTLC {
135
+ AddHTLC { // TODO: Time out if we're getting close to cltv_expiry
137
136
// always outbound
138
137
amount_msat : u64 ,
139
138
cltv_expiry : u32 ,
140
139
payment_hash : PaymentHash ,
141
140
source : HTLCSource ,
142
141
onion_routing_packet : msgs:: OnionPacket ,
143
- time_created : Instant , //TODO: Some kind of timeout thing-a-majig
144
142
} ,
145
143
ClaimHTLC {
146
144
payment_preimage : PaymentPreimage ,
@@ -3252,7 +3250,6 @@ impl Channel {
3252
3250
cltv_expiry : cltv_expiry,
3253
3251
source,
3254
3252
onion_routing_packet : onion_routing_packet,
3255
- time_created : Instant :: now ( ) ,
3256
3253
} ) ;
3257
3254
return Ok ( None ) ;
3258
3255
}
@@ -3622,14 +3619,13 @@ impl Writeable for Channel {
3622
3619
( self . holding_cell_htlc_updates . len ( ) as u64 ) . write ( writer) ?;
3623
3620
for update in self . holding_cell_htlc_updates . iter ( ) {
3624
3621
match update {
3625
- & HTLCUpdateAwaitingACK :: AddHTLC { ref amount_msat, ref cltv_expiry, ref payment_hash, ref source, ref onion_routing_packet, time_created : _ } => {
3622
+ & HTLCUpdateAwaitingACK :: AddHTLC { ref amount_msat, ref cltv_expiry, ref payment_hash, ref source, ref onion_routing_packet } => {
3626
3623
0u8 . write ( writer) ?;
3627
3624
amount_msat. write ( writer) ?;
3628
3625
cltv_expiry. write ( writer) ?;
3629
3626
payment_hash. write ( writer) ?;
3630
3627
source. write ( writer) ?;
3631
3628
onion_routing_packet. write ( writer) ?;
3632
- // time_created is not serialized - we re-init the timeout upon deserialization
3633
3629
} ,
3634
3630
& HTLCUpdateAwaitingACK :: ClaimHTLC { ref payment_preimage, ref htlc_id } => {
3635
3631
1u8 . write ( writer) ?;
@@ -3796,7 +3792,6 @@ impl<R : ::std::io::Read> ReadableArgs<R, Arc<Logger>> for Channel {
3796
3792
payment_hash : Readable :: read ( reader) ?,
3797
3793
source : Readable :: read ( reader) ?,
3798
3794
onion_routing_packet : Readable :: read ( reader) ?,
3799
- time_created : Instant :: now ( ) ,
3800
3795
} ,
3801
3796
1 => HTLCUpdateAwaitingACK :: ClaimHTLC {
3802
3797
payment_preimage : Readable :: read ( reader) ?,
0 commit comments