Skip to content

Commit

Permalink
Fix fuzz tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tibo-lg committed Nov 6, 2023
1 parent 5593041 commit c92a3ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fuzz/src/chanmon_consistency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ impl chain::Watch<EnforcingSigner> for TestChainMonitor {
fn release_pending_monitor_events(&self) -> Vec<(OutPoint, Vec<MonitorEvent>, Option<PublicKey>)> {
return self.chain_monitor.release_pending_monitor_events();
}

fn update_channel_funding_txo(&self, old_funding_txo: OutPoint, new_funding_txo: OutPoint, channel_value_satoshis: u64) -> ChannelMonitorUpdateStatus {
todo!()
}
}

struct KeyProvider {
Expand Down Expand Up @@ -306,6 +310,7 @@ fn check_api_err(api_err: APIError, sendable_bounds_violated: bool) {
// We can (obviously) temp-fail a monitor update
},
APIError::IncompatibleShutdownScript { .. } => panic!("Cannot send an incompatible shutdown script"),
APIError::ExternalError { .. } => panic!("We don't produce external errors in fuzz!"),
}
}
#[inline]
Expand Down
5 changes: 5 additions & 0 deletions fuzz/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ pub fn do_test<Out: test_logger::Output>(data: &[u8], out: Out) {
config: None,
feerate_sat_per_1000_weight: None,
channel_shutdown_state: Some(channelmanager::ChannelShutdownState::NotShuttingDown),
funding_redeemscript: None,
holder_funding_pubkey: get_pubkey!(),
counter_funding_pubkey: None,
original_funding_outpoint: None,
channel_keys_id: [0u8; 32],
});
}
Some(&first_hops_vec[..])
Expand Down

0 comments on commit c92a3ae

Please sign in to comment.