mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-03-26 21:42:35 +01:00
Assert usize is 32 or 64 bits, as required in a TODO
This commit is contained in:
parent
d5e316f5a0
commit
fb9f169279
1 changed files with 4 additions and 2 deletions
|
@ -137,13 +137,15 @@ impl ChannelHolder {
|
||||||
by_id: &mut self.by_id,
|
by_id: &mut self.by_id,
|
||||||
short_to_id: &mut self.short_to_id,
|
short_to_id: &mut self.short_to_id,
|
||||||
next_forward: &mut self.next_forward,
|
next_forward: &mut self.next_forward,
|
||||||
/// short channel id -> forward infos. Key of 0 means payments received
|
|
||||||
forward_htlcs: &mut self.forward_htlcs,
|
forward_htlcs: &mut self.forward_htlcs,
|
||||||
claimable_htlcs: &mut self.claimable_htlcs,
|
claimable_htlcs: &mut self.claimable_htlcs,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(any(target_pointer_width = "32", target_pointer_width = "64")))]
|
||||||
|
const ERR: () = "You need at least 32 bit pointers (well, usize, but we'll assume they're the same) for ChannelManager::latest_block_height";
|
||||||
|
|
||||||
/// Manager which keeps track of a number of channels and sends messages to the appropriate
|
/// Manager which keeps track of a number of channels and sends messages to the appropriate
|
||||||
/// channel, also tracking HTLC preimages and forwarding onion packets appropriately.
|
/// channel, also tracking HTLC preimages and forwarding onion packets appropriately.
|
||||||
/// Implements ChannelMessageHandler, handling the multi-channel parts and passing things through
|
/// Implements ChannelMessageHandler, handling the multi-channel parts and passing things through
|
||||||
|
@ -157,7 +159,7 @@ pub struct ChannelManager {
|
||||||
|
|
||||||
announce_channels_publicly: bool,
|
announce_channels_publicly: bool,
|
||||||
fee_proportional_millionths: u32,
|
fee_proportional_millionths: u32,
|
||||||
latest_block_height: AtomicUsize, //TODO: Compile-time assert this is at least 32-bits long
|
latest_block_height: AtomicUsize,
|
||||||
secp_ctx: Secp256k1,
|
secp_ctx: Secp256k1,
|
||||||
|
|
||||||
channel_state: Mutex<ChannelHolder>,
|
channel_state: Mutex<ChannelHolder>,
|
||||||
|
|
Loading…
Add table
Reference in a new issue