]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Merge pull request #2111 from TheBlueMatt/2023-03-sent-persist-order-prep
authorMatt Corallo <649246+TheBlueMatt@users.noreply.github.com>
Thu, 4 May 2023 21:26:44 +0000 (21:26 +0000)
committerGitHub <noreply@github.com>
Thu, 4 May 2023 21:26:44 +0000 (21:26 +0000)
Setup Support for delaying `ChannelMonitorUpdate` flight until an `Event` completes

1  2 
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/outbound_payment.rs

Simple merge
index bf863797ada01ff4594615a8e7c7bda84e22fb9c,326206ed7490b0dacdea3160b262ee38c7b2fe67..3bf215d0a4aef8d40a923b332ea62c44f403a199
@@@ -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<u32>) -> Result<(), APIError> {
 +      fn close_channel_internal(&self, channel_id: &[u8; 32], counterparty_node_id: &PublicKey, target_feerate_sats_per_1000_weight: Option<u32>, override_shutdown_script: Option<ShutdownScript>) -> Result<(), APIError> {
                let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(&self.total_consistency_lock, &self.persistence_notifier);
  
                let mut failed_htlcs: Vec<(HTLCSource, PaymentHash)>;
Simple merge
index 395727f67520e3fecdd19d6947e63788b3843fe6,f363a6d60ffa7b877057c5c19b568aecd6a419d7..569e664bad18302ec9cc801ef401874da9d7f2e4
@@@ -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;