From: Matt Corallo <649246+TheBlueMatt@users.noreply.github.com> Date: Thu, 4 May 2023 21:26:44 +0000 (+0000) Subject: Merge pull request #2111 from TheBlueMatt/2023-03-sent-persist-order-prep X-Git-Tag: v0.0.116-alpha1~52 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=e94647ca4ebc63be4a8164804d08cf37e4655d6c;p=rust-lightning Merge pull request #2111 from TheBlueMatt/2023-03-sent-persist-order-prep Setup Support for delaying `ChannelMonitorUpdate` flight until an `Event` completes --- e94647ca4ebc63be4a8164804d08cf37e4655d6c diff --cc lightning/src/ln/channelmanager.rs index bf863797a,326206ed7..3bf215d0a --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@@ -2026,10 -2054,10 +2059,10 @@@ wher channel_id: channel.channel_id(), user_channel_id: channel.get_user_id(), reason: closure_reason - }); + }, None)); } - fn close_channel_internal(&self, channel_id: &[u8; 32], counterparty_node_id: &PublicKey, target_feerate_sats_per_1000_weight: Option) -> Result<(), APIError> { + fn close_channel_internal(&self, channel_id: &[u8; 32], counterparty_node_id: &PublicKey, target_feerate_sats_per_1000_weight: Option, override_shutdown_script: Option) -> Result<(), APIError> { let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(&self.total_consistency_lock, &self.persistence_notifier); let mut failed_htlcs: Vec<(HTLCSource, PaymentHash)>; diff --cc lightning/src/ln/outbound_payment.rs index 395727f67,f363a6d60..569e664ba --- a/lightning/src/ln/outbound_payment.rs +++ b/lightning/src/ln/outbound_payment.rs @@@ -13,10 -13,10 +13,10 @@@ use bitcoin::hashes::Hash use bitcoin::hashes::sha256::Hash as Sha256; use bitcoin::secp256k1::{self, Secp256k1, SecretKey}; -use crate::chain::keysinterface::{EntropySource, NodeSigner, Recipient}; +use crate::sign::{EntropySource, NodeSigner, Recipient}; use crate::events::{self, PaymentFailureReason}; use crate::ln::{PaymentHash, PaymentPreimage, PaymentSecret}; - use crate::ln::channelmanager::{ChannelDetails, HTLCSource, IDEMPOTENCY_TIMEOUT_TICKS, PaymentId}; + use crate::ln::channelmanager::{ChannelDetails, EventCompletionAction, HTLCSource, IDEMPOTENCY_TIMEOUT_TICKS, PaymentId}; use crate::ln::onion_utils::HTLCFailReason; use crate::routing::router::{InFlightHtlcs, Path, PaymentParameters, Route, RouteParameters, Router}; use crate::util::errors::APIError;