Skip to content

Onion Error Handling #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Dec 18, 2018
6 changes: 3 additions & 3 deletions fuzz/fuzz_targets/full_stack_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use lightning::chain::chaininterface::{BroadcasterInterface,ConfirmationTarget,C
use lightning::chain::transaction::OutPoint;
use lightning::chain::keysinterface::{ChannelKeys, KeysInterface};
use lightning::ln::channelmonitor;
use lightning::ln::channelmanager::{ChannelManager, PaymentFailReason, PaymentHash, PaymentPreimage};
use lightning::ln::channelmanager::{ChannelManager, PaymentHash, PaymentPreimage};
use lightning::ln::peer_handler::{MessageHandler,PeerManager,SocketDescriptor};
use lightning::ln::router::Router;
use lightning::util::events::{EventsProvider,Event};
Expand Down Expand Up @@ -419,7 +419,7 @@ pub fn do_test(data: &[u8], logger: &Arc<Logger>) {
// fulfill this HTLC, but if they are, we can just take the first byte and
// place that anywhere in our preimage.
if &payment.0[1..] != &[0; 31] {
channelmanager.fail_htlc_backwards(&payment, PaymentFailReason::PreimageUnknown);
channelmanager.fail_htlc_backwards(&payment, 0);
} else {
let mut payment_preimage = PaymentPreimage([0; 32]);
payment_preimage.0[0] = payment.0[0];
Expand All @@ -429,7 +429,7 @@ pub fn do_test(data: &[u8], logger: &Arc<Logger>) {
},
9 => {
for payment in payments_received.drain(..) {
channelmanager.fail_htlc_backwards(&payment, PaymentFailReason::PreimageUnknown);
channelmanager.fail_htlc_backwards(&payment, 0);
}
},
10 => {
Expand Down
Loading