@@ -137,13 +137,15 @@ impl ChannelHolder {
137
137
by_id : & mut self . by_id ,
138
138
short_to_id : & mut self . short_to_id ,
139
139
next_forward : & mut self . next_forward ,
140
- /// short channel id -> forward infos. Key of 0 means payments received
141
140
forward_htlcs : & mut self . forward_htlcs ,
142
141
claimable_htlcs : & mut self . claimable_htlcs ,
143
142
}
144
143
}
145
144
}
146
145
146
+ #[ cfg( not( any( target_pointer_width = "32" , target_pointer_width = "64" ) ) ) ]
147
+ const ERR : ( ) = "You need at least 32 bit pointers (well, usize, but we'll assume they're the same) for ChannelManager::latest_block_height" ;
148
+
147
149
/// Manager which keeps track of a number of channels and sends messages to the appropriate
148
150
/// channel, also tracking HTLC preimages and forwarding onion packets appropriately.
149
151
/// Implements ChannelMessageHandler, handling the multi-channel parts and passing things through
@@ -157,7 +159,7 @@ pub struct ChannelManager {
157
159
158
160
announce_channels_publicly : bool ,
159
161
fee_proportional_millionths : u32 ,
160
- latest_block_height : AtomicUsize , //TODO: Compile-time assert this is at least 32-bits long
162
+ latest_block_height : AtomicUsize ,
161
163
secp_ctx : Secp256k1 ,
162
164
163
165
channel_state : Mutex < ChannelHolder > ,
0 commit comments