Merge pull request #2555 from tnull/2023-08-have-get-route-take-params
[rust-lightning] / lightning / src / ln / channelmanager.rs
index 5624204a504b82d4cb134598386d06bd9faa4c3e..cff9837fcebb8f437e911f2872057e5a490631f6 100644 (file)
@@ -3561,11 +3561,13 @@ where
        pub fn funding_transaction_generated(&self, temporary_channel_id: &ChannelId, counterparty_node_id: &PublicKey, funding_transaction: Transaction) -> Result<(), APIError> {
                let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self);
 
-               for inp in funding_transaction.input.iter() {
-                       if inp.witness.is_empty() {
-                               return Err(APIError::APIMisuseError {
-                                       err: "Funding transaction must be fully signed and spend Segwit outputs".to_owned()
-                               });
+               if !funding_transaction.is_coin_base() {
+                       for inp in funding_transaction.input.iter() {
+                               if inp.witness.is_empty() {
+                                       return Err(APIError::APIMisuseError {
+                                               err: "Funding transaction must be fully signed and spend Segwit outputs".to_owned()
+                                       });
+                               }
                        }
                }
                {