X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fchannelmanager.rs;h=7f9531331b448239bb89db06d68ed397d6092afb;hb=d03640082b1c47647a273ccbeafed9a1e986d96c;hp=9e087785b537985714ddfee30e9da54e76df36cb;hpb=b3d257d70f2c02d5e4c455507a30838672862658;p=rust-lightning diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 9e087785..7f953133 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -113,6 +113,7 @@ pub(super) struct PendingHTLCInfo { pub(super) incoming_shared_secret: [u8; 32], payment_hash: PaymentHash, pub(super) amt_to_forward: u64, + pub(super) amt_incoming: Option, // Added in 0.0.113 pub(super) outgoing_cltv_value: u32, } @@ -2196,6 +2197,7 @@ impl ChannelManager ChannelManager ChannelManager { // unknown_next_peer // Note that this is likely a timing oracle for detecting whether an scid is a // phantom. - if fake_scid::is_valid_phantom(&self.fake_scid_rand_bytes, *short_channel_id) { + if fake_scid::is_valid_phantom(&self.fake_scid_rand_bytes, *short_channel_id, &self.genesis_hash) { None } else { break Some(("Don't have available channel for forwarding as requested.", 0x4000 | 10, None)); @@ -3155,7 +3158,7 @@ impl ChannelManager { macro_rules! failure_handler { @@ -3199,7 +3202,7 @@ impl ChannelManager res, @@ -3262,7 +3265,7 @@ impl ChannelManager { log_trace!(self.logger, "Adding HTLC from short id {} with payment_hash {} to channel with short id {} after delay", prev_short_channel_id, log_bytes!(payment_hash.0), short_chan_id); @@ -6470,7 +6473,8 @@ impl_writeable_tlv_based!(PendingHTLCInfo, { (2, incoming_shared_secret, required), (4, payment_hash, required), (6, amt_to_forward, required), - (8, outgoing_cltv_value, required) + (8, outgoing_cltv_value, required), + (9, amt_incoming, option), }); @@ -6669,7 +6673,7 @@ impl Writeable for HTLCSource { (1, payment_id_opt, option), (2, first_hop_htlc_msat, required), (3, payment_secret, option), - (4, path, vec_type), + (4, *path, vec_type), (5, payment_params, option), }); }