name: Continuous Integration Checks
-on:
- push:
+on: [push, pull_request]
jobs:
build:
run: |
sudo apt-get update
sudo apt-get -y install build-essential binutils-dev libunwind-dev
- - name: Fuzz test on Rust ${{ matrix.TOOLCHAIN }}
+ - name: Sanity check fuzz targets on Rust ${{ env.TOOLCHAIN }}
run: cd fuzz && cargo test --verbose --color always
- - name: Generate fuzz report
+ - name: Run fuzzers
run: cd fuzz && ./ci-fuzz.sh
[ "$(git diff)" != "" ] && exit 1
popd
-cargo install --force honggfuzz
+cargo install --color always --force honggfuzz
sed -i 's/lto = true//' Cargo.toml
-HFUZZ_BUILD_ARGS="--features honggfuzz_fuzz" cargo hfuzz build
+HFUZZ_BUILD_ARGS="--features honggfuzz_fuzz" cargo --color always hfuzz build
for TARGET in src/bin/*.rs; do
FILENAME=$(basename $TARGET)
FILE="${FILENAME%.*}"
HFUZZ_RUN_ARGS="--exit_upon_crash -v -n2"
if [ "$FILE" = "chanmon_consistency_target" ]; then
HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -F 64 -N100000"
+ elif [ "$FILE" = "full_stack_target" ]; then
+ HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -t0 -N1000000"
else
HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -N1000000"
fi
export HFUZZ_RUN_ARGS
- HFUZZ_BUILD_ARGS="--features honggfuzz_fuzz" cargo hfuzz run $FILE
+ HFUZZ_BUILD_ARGS="--features honggfuzz_fuzz" cargo --color always hfuzz run $FILE
if [ -f hfuzz_workspace/$FILE/HONGGFUZZ.REPORT.TXT ]; then
cat hfuzz_workspace/$FILE/HONGGFUZZ.REPORT.TXT
for CASE in hfuzz_workspace/$FILE/SIG*; do
extern crate lightning_fuzz;
use lightning_fuzz::chanmon_consistency::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
chanmon_consistency_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::chanmon_deser::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
chanmon_deser_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::full_stack::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
full_stack_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_accept_channel::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_accept_channel_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_announcement_signatures::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_announcement_signatures_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_channel_announcement::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_channel_announcement_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_channel_reestablish::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_channel_reestablish_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_channel_update::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_channel_update_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_closing_signed::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_closing_signed_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_commitment_signed::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_commitment_signed_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_decoded_onion_error_packet::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_decoded_onion_error_packet_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_error_message::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_error_message_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_funding_created::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_funding_created_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_funding_locked::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_funding_locked_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_funding_signed::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_funding_signed_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_init::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_init_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_node_announcement::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_node_announcement_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_onion_hop_data::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_onion_hop_data_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_open_channel::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_open_channel_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_ping::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_ping_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_pong::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_pong_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_revoke_and_ack::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_revoke_and_ack_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_shutdown::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_shutdown_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_update_add_htlc::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_update_add_htlc_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_update_fail_htlc::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_update_fail_htlc_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_update_fail_malformed_htlc::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_update_fail_malformed_htlc_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_update_fee::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_update_fee_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::msg_targets::msg_update_fulfill_htlc::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
msg_update_fulfill_htlc_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::peer_crypt::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
peer_crypt_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::router::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
router_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
extern crate lightning_fuzz;
use lightning_fuzz::TARGET_MOD::*;
-use std::fs;
-use std::io::Read;
-
#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[cfg(feature = "afl")]
#[cfg(feature = "stdin_fuzz")]
fn main() {
+ use std::io::Read;
+
let mut data = Vec::with_capacity(8192);
std::io::stdin().read_to_end(&mut data).unwrap();
TARGET_NAME_run(data.as_ptr(), data.len());
#[test]
fn run_test_cases() {
+ use std::fs;
+ use std::io::Read;
use lightning_fuzz::utils::test_logger::StringBuffer;
use std::sync::{atomic, Arc};
/// to drop us, but we store this anyway.
ShutdownComplete = 4096,
}
-const BOTH_SIDES_SHUTDOWN_MASK: u32 = (ChannelState::LocalShutdownSent as u32 | ChannelState::RemoteShutdownSent as u32);
-const MULTI_STATE_FLAGS: u32 = (BOTH_SIDES_SHUTDOWN_MASK | ChannelState::PeerDisconnected as u32 | ChannelState::MonitorUpdateFailed as u32);
+const BOTH_SIDES_SHUTDOWN_MASK: u32 = ChannelState::LocalShutdownSent as u32 | ChannelState::RemoteShutdownSent as u32;
+const MULTI_STATE_FLAGS: u32 = BOTH_SIDES_SHUTDOWN_MASK | ChannelState::PeerDisconnected as u32 | ChannelState::MonitorUpdateFailed as u32;
const INITIAL_COMMITMENT_NUMBER: u64 = (1 << 48) - 1;
/// Maximmum `funding_satoshis` value, according to the BOLT #2 specification
/// it's 2^24.
-pub const MAX_FUNDING_SATOSHIS: u64 = (1 << 24);
+pub const MAX_FUNDING_SATOSHIS: u64 = 1 << 24;
/// Used to return a simple Error back to ChannelManager. Will get converted to a
/// msgs::ErrorAction::SendErrorMessage or msgs::ErrorAction::IgnoreError as appropriate with our