_ if err.starts_with("Cannot push more than their max accepted HTLCs ") => {},
_ if err.starts_with("Cannot send value that would put us over the max HTLC value in flight our peer will accept ") => {},
_ if err.starts_with("Cannot send value that would put our balance under counterparty-announced channel reserve value") => {},
+ _ if err.starts_with("Cannot send value that would put counterparty balance under holder-announced channel reserve value") => {},
_ if err.starts_with("Cannot send value that would overdraw remaining funds.") => {},
_ if err.starts_with("Cannot send value that would not leave enough to pay for fees.") => {},
_ => panic!("{}", err),
let monitor = Arc::new(TestChainMonitor::new(broadcast.clone(), logger.clone(), fee_est.clone(), Arc::new(TestPersister{}), Arc::clone(&keys_manager)));
let mut config = UserConfig::default();
- config.channel_options.fee_proportional_millionths = 0;
+ config.channel_options.forwarding_fee_proportional_millionths = 0;
config.channel_options.announced_channel = true;
let network = Network::Bitcoin;
let params = ChainParameters {
let chain_monitor = Arc::new(TestChainMonitor::new(broadcast.clone(), logger.clone(), fee_est.clone(), Arc::new(TestPersister{}), Arc::clone(& $keys_manager)));
let mut config = UserConfig::default();
- config.channel_options.fee_proportional_millionths = 0;
+ config.channel_options.forwarding_fee_proportional_millionths = 0;
config.channel_options.announced_channel = true;
let mut monitors = HashMap::new();
events::MessageSendEvent::SendFundingLocked { .. } => continue,
events::MessageSendEvent::SendAnnouncementSignatures { .. } => continue,
events::MessageSendEvent::PaymentFailureNetworkUpdate { .. } => continue,
- _ => panic!("Unhandled message event"),
+ events::MessageSendEvent::SendChannelUpdate { ref node_id, ref msg } => {
+ assert_eq!(msg.contents.flags & 2, 0); // The disable bit must never be set!
+ if Some(*node_id) == expect_drop_id { panic!("peer_disconnected should drop msgs bound for the disconnected peer"); }
+ *node_id == a_id
+ },
+ _ => panic!("Unhandled message event {:?}", event),
};
if push_a { ba_events.push(event); } else { bc_events.push(event); }
}
// Can be generated due to a payment forward being rejected due to a
// channel having previously failed a monitor update
},
- _ => panic!("Unhandled message event"),
+ events::MessageSendEvent::SendChannelUpdate { ref msg, .. } => {
+ // When we reconnect we will resend a channel_update to make sure our
+ // counterparty has the latest parameters for receiving payments
+ // through us. We do, however, check that the message does not include
+ // the "disabled" bit, as we should never ever have a channel which is
+ // disabled when we send such an update (or it may indicate channel
+ // force-close which we should detect as an error).
+ assert_eq!(msg.contents.flags & 2, 0);
+ },
+ _ => panic!("Unhandled message event {:?}", event),
}
if $limit_events != ProcessMessages::AllMessages {
break;
events::MessageSendEvent::SendFundingLocked { .. } => {},
events::MessageSendEvent::SendAnnouncementSignatures { .. } => {},
events::MessageSendEvent::PaymentFailureNetworkUpdate { .. } => {},
+ events::MessageSendEvent::SendChannelUpdate { ref msg, .. } => {
+ assert_eq!(msg.contents.flags & 2, 0); // The disable bit must never be set!
+ },
_ => panic!("Unhandled message event"),
}
}
events::MessageSendEvent::SendFundingLocked { .. } => {},
events::MessageSendEvent::SendAnnouncementSignatures { .. } => {},
events::MessageSendEvent::PaymentFailureNetworkUpdate { .. } => {},
+ events::MessageSendEvent::SendChannelUpdate { ref msg, .. } => {
+ assert_eq!(msg.contents.flags & 2, 0); // The disable bit must never be set!
+ },
_ => panic!("Unhandled message event"),
}
}
},
events::Event::PaymentSent { .. } => {},
events::Event::PaymentFailed { .. } => {},
+ events::Event::PaymentForwarded { .. } if $node == 1 => {},
events::Event::PendingHTLCsForwardable { .. } => {
nodes[$node].process_pending_htlc_forwards();
},