Skip to content

Commit

Permalink
Merge pull request #1540 from wpaulino/rename-config-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlueMatt authored Jun 14, 2022
2 parents 4356809 + 44fa3ac commit 8fce6a1
Show file tree
Hide file tree
Showing 13 changed files with 160 additions and 160 deletions.
8 changes: 4 additions & 4 deletions fuzz/src/chanmon_consistency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ pub fn do_test<Out: Output>(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,
Expand All @@ -376,8 +376,8 @@ pub fn do_test<Out: Output>(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();
Expand Down
4 changes: 2 additions & 2 deletions fuzz/src/full_stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ pub fn do_test(data: &[u8], logger: &Arc<dyn Logger>) {

let keys_manager = Arc::new(KeyProvider { node_secret: our_network_key.clone(), inbound_payment_key: KeyMaterial(inbound_payment_key.try_into().unwrap()), counter: AtomicU64::new(0) });
let mut config = UserConfig::default();
config.channel_options.forwarding_fee_proportional_millionths = slice_to_be32(get_slice!(4));
config.own_channel_config.announced_channel = get_slice!(1)[0] != 0;
config.channel_config.forwarding_fee_proportional_millionths = slice_to_be32(get_slice!(4));
config.channel_handshake_config.announced_channel = get_slice!(1)[0] != 0;
let network = Network::Bitcoin;
let params = ChainParameters {
network,
Expand Down
4 changes: 2 additions & 2 deletions lightning-invoice/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ mod test {
// `msgs::ChannelUpdate` is never handled for the node(s). As the `msgs::ChannelUpdate`
// is never handled, the `channel.counterparty.forwarding_info` is never assigned.
let mut private_chan_cfg = UserConfig::default();
private_chan_cfg.own_channel_config.announced_channel = false;
private_chan_cfg.channel_handshake_config.announced_channel = false;
let temporary_channel_id = nodes[2].node.create_channel(nodes[0].node.get_our_node_id(), 1_000_000, 500_000_000, 42, Some(private_chan_cfg)).unwrap();
let open_channel = get_event_msg!(nodes[2], MessageSendEvent::SendOpenChannel, nodes[0].node.get_our_node_id());
nodes[0].node.handle_open_channel(&nodes[2].node.get_our_node_id(), InitFeatures::known(), &open_channel);
Expand Down Expand Up @@ -1046,7 +1046,7 @@ mod test {
// `msgs::ChannelUpdate` is never handled for the node(s). As the `msgs::ChannelUpdate`
// is never handled, the `channel.counterparty.forwarding_info` is never assigned.
let mut private_chan_cfg = UserConfig::default();
private_chan_cfg.own_channel_config.announced_channel = false;
private_chan_cfg.channel_handshake_config.announced_channel = false;
let temporary_channel_id = nodes[1].node.create_channel(nodes[3].node.get_our_node_id(), 1_000_000, 500_000_000, 42, Some(private_chan_cfg)).unwrap();
let open_channel = get_event_msg!(nodes[1], MessageSendEvent::SendOpenChannel, nodes[3].node.get_our_node_id());
nodes[3].node.handle_open_channel(&nodes[1].node.get_our_node_id(), InitFeatures::known(), &open_channel);
Expand Down
6 changes: 3 additions & 3 deletions lightning/src/ln/chanmon_update_fail_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2541,7 +2541,7 @@ fn test_temporary_error_during_shutdown() {
// Test that temporary failures when updating the monitor's shutdown script delay cooperative
// close.
let mut config = test_default_channel_config();
config.own_channel_config.commit_upfront_shutdown_pubkey = false;
config.channel_handshake_config.commit_upfront_shutdown_pubkey = false;

let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
Expand Down Expand Up @@ -2596,7 +2596,7 @@ fn test_permanent_error_during_sending_shutdown() {
// Test that permanent failures when updating the monitor's shutdown script result in a force
// close when initiating a cooperative close.
let mut config = test_default_channel_config();
config.own_channel_config.commit_upfront_shutdown_pubkey = false;
config.channel_handshake_config.commit_upfront_shutdown_pubkey = false;

let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
Expand All @@ -2617,7 +2617,7 @@ fn test_permanent_error_during_handling_shutdown() {
// Test that permanent failures when updating the monitor's shutdown script result in a force
// close when handling a cooperative close.
let mut config = test_default_channel_config();
config.own_channel_config.commit_upfront_shutdown_pubkey = false;
config.channel_handshake_config.commit_upfront_shutdown_pubkey = false;

let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
Expand Down
Loading

0 comments on commit 8fce6a1

Please sign in to comment.