From: Matt Corallo <649246+TheBlueMatt@users.noreply.github.com> Date: Fri, 8 Oct 2021 20:49:19 +0000 (+0000) Subject: Merge pull request #1062 from galderz/t_payment_hash_999 X-Git-Tag: v0.0.102~11 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=e635db0da31841e8a8ac5c5450c8f595541a6ced;p=rust-lightning Merge pull request #1062 from galderz/t_payment_hash_999 --- e635db0da31841e8a8ac5c5450c8f595541a6ced diff --cc lightning/src/ln/channelmanager.rs index 152de61fd,43fd8f1de..1b5813a30 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@@ -3304,12 -3157,16 +3304,16 @@@ impl {}, _ => panic!("Unexpected event"), } } diff --cc lightning/src/util/events.rs index 22b2f4002,ad82ca6ca..2b6a55bce --- a/lightning/src/util/events.rs +++ b/lightning/src/util/events.rs @@@ -16,14 -16,13 +16,15 @@@ use chain::keysinterface::SpendableOutputDescriptor; use ln::msgs; +use ln::msgs::DecodeError; use ln::{PaymentPreimage, PaymentHash, PaymentSecret}; use routing::network_graph::NetworkUpdate; -use util::ser::{Writeable, Writer, MaybeReadable, Readable, VecReadWrapper, VecWriteWrapper}; +use util::ser::{BigSize, FixedLengthReader, Writeable, Writer, MaybeReadable, Readable, VecReadWrapper, VecWriteWrapper}; +use routing::router::RouteHop; use bitcoin::blockdata::script::Script; - + use bitcoin::hashes::Hash; + use bitcoin::hashes::sha256::Hash as Sha256; use bitcoin::secp256k1::key::PublicKey; use io; @@@ -291,10 -231,10 +296,11 @@@ impl Writeable for Event 2u8.write(writer)?; write_tlv_fields!(writer, { (0, payment_preimage, required), + (1, payment_hash, required), }); }, - &Event::PaymentFailed { ref payment_hash, ref rejected_by_dest, ref network_update, ref all_paths_failed, + &Event::PaymentPathFailed { ref payment_hash, ref rejected_by_dest, ref network_update, + ref all_paths_failed, ref path, #[cfg(test)] ref error_code, #[cfg(test)]