Skip to content

Commit ae803b8

Browse files
committed
Fix deny(const_err) lint warnings
This lint has been deny-by-default since Rust 1.51 and has recently made a hard error, which should ensure that we continue to get failures, at the very least in beta CI. See rust-lang/rust#71800
1 parent aa84b14 commit ae803b8

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

Diff for: lightning/src/ln/channelmanager.rs

-2
Original file line numberDiff line numberDiff line change
@@ -949,13 +949,11 @@ pub const MIN_FINAL_CLTV_EXPIRY: u32 = HTLC_FAIL_BACK_BUFFER + 3;
949949
// then waiting ANTI_REORG_DELAY to be reorg-safe on the outbound HLTC and
950950
// failing the corresponding htlc backward, and us now seeing the last block of ANTI_REORG_DELAY before
951951
// LATENCY_GRACE_PERIOD_BLOCKS.
952-
#[deny(const_err)]
953952
#[allow(dead_code)]
954953
const CHECK_CLTV_EXPIRY_SANITY: u32 = MIN_CLTV_EXPIRY_DELTA as u32 - LATENCY_GRACE_PERIOD_BLOCKS - CLTV_CLAIM_BUFFER - ANTI_REORG_DELAY - LATENCY_GRACE_PERIOD_BLOCKS;
955954

956955
// Check for ability of an attacker to make us fail on-chain by delaying an HTLC claim. See
957956
// ChannelMonitor::should_broadcast_holder_commitment_txn for a description of why this is needed.
958-
#[deny(const_err)]
959957
#[allow(dead_code)]
960958
const CHECK_CLTV_EXPIRY_SANITY_2: u32 = MIN_CLTV_EXPIRY_DELTA as u32 - LATENCY_GRACE_PERIOD_BLOCKS - 2*CLTV_CLAIM_BUFFER;
961959

Diff for: lightning/src/ln/peer_handler.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1981,7 +1981,6 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, OM: Deref, L: Deref, CM
19811981
// broadcast_node_announcement panics) of the maximum-length addresses would fit in a 64KB
19821982
// message...
19831983
const HALF_MESSAGE_IS_ADDRS: u32 = ::core::u16::MAX as u32 / (NetAddress::MAX_LEN as u32 + 1) / 2;
1984-
#[deny(const_err)]
19851984
#[allow(dead_code)]
19861985
// ...by failing to compile if the number of addresses that would be half of a message is
19871986
// smaller than 100:

0 commit comments

Comments
 (0)