X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=fuzz%2Fsrc%2Fchanmon_consistency.rs;h=bfaa6501d1e4640b1ff3c0bf688a2493aeb29948;hb=17e6c374c513f2eca810fa4e931be65f0d4fc29f;hp=8e70ba42eafecb63034678dd18a9ca2cb727f8c0;hpb=5421e1a6e712ae3d04569562fd036e29908188d7;p=rust-lightning diff --git a/fuzz/src/chanmon_consistency.rs b/fuzz/src/chanmon_consistency.rs index 8e70ba42..bfaa6501 100644 --- a/fuzz/src/chanmon_consistency.rs +++ b/fuzz/src/chanmon_consistency.rs @@ -356,8 +356,8 @@ pub fn do_test(data: &[u8], underlying_out: Out) { Arc::new(TestPersister { update_ret: Mutex::new(Ok(())) }), Arc::clone(&keys_manager))); let mut config = UserConfig::default(); - config.channel_options.forwarding_fee_proportional_millionths = 0; - config.own_channel_config.announced_channel = true; + config.channel_config.forwarding_fee_proportional_millionths = 0; + config.channel_handshake_config.announced_channel = true; let network = Network::Bitcoin; let params = ChainParameters { network, @@ -376,8 +376,8 @@ pub fn do_test(data: &[u8], underlying_out: Out) { Arc::new(TestPersister { update_ret: Mutex::new(Ok(())) }), Arc::clone(& $keys_manager))); let mut config = UserConfig::default(); - config.channel_options.forwarding_fee_proportional_millionths = 0; - config.own_channel_config.announced_channel = true; + config.channel_config.forwarding_fee_proportional_millionths = 0; + config.channel_handshake_config.announced_channel = true; let mut monitors = HashMap::new(); let mut old_monitors = $old_monitors.latest_monitors.lock().unwrap(); @@ -850,10 +850,17 @@ pub fn do_test(data: &[u8], underlying_out: Out) { events::Event::PaymentClaimed { .. } => {}, events::Event::PaymentPathSuccessful { .. } => {}, events::Event::PaymentPathFailed { .. } => {}, + events::Event::ProbeSuccessful { .. } | events::Event::ProbeFailed { .. } => { + // Even though we don't explicitly send probes, because probes are + // detected based on hashing the payment hash+preimage, its rather + // trivial for the fuzzer to build payments that accidentally end up + // looking like probes. + }, events::Event::PaymentForwarded { .. } if $node == 1 => {}, events::Event::PendingHTLCsForwardable { .. } => { nodes[$node].process_pending_htlc_forwards(); }, + events::Event::HTLCHandlingFailed { .. } => {}, _ => if out.may_fail.load(atomic::Ordering::Acquire) { return; } else {