@@ -1247,6 +1247,29 @@ impl UnfundedChannelContext {
1247
1247
}
1248
1248
}
1249
1249
1250
+ /// Stores values related to retrying the handshake process for outbound channels
1251
+ /// after disconnection and reconnection.
1252
+ pub(super) struct OutboundContext {
1253
+ received_accept_channel_msg: Option<msgs::AcceptChannel>,
1254
+ created_funding_transaction: Option<FundingTransaction>
1255
+ }
1256
+
1257
+ impl OutboundContext {
1258
+ /// Create a new [`OutboundContext`] with blank values.
1259
+ pub fn new() -> Self {
1260
+ OutboundContext {
1261
+ received_accept_channel_msg: None,
1262
+ created_funding_transaction: None,
1263
+ }
1264
+ }
1265
+ }
1266
+
1267
+ struct FundingTransaction {
1268
+ funding_transaction: Transaction,
1269
+ outpoint: OutPoint,
1270
+ is_batch_funding: bool,
1271
+ }
1272
+
1250
1273
/// Contains everything about the channel including state, and various flags.
1251
1274
pub(super) struct ChannelContext<SP: Deref> where SP::Target: SignerProvider {
1252
1275
config: LegacyChannelConfig,
@@ -7285,6 +7308,7 @@ impl<SP: Deref> Channel<SP> where
7285
7308
pub(super) struct OutboundV1Channel<SP: Deref> where SP::Target: SignerProvider {
7286
7309
pub context: ChannelContext<SP>,
7287
7310
pub unfunded_context: UnfundedChannelContext,
7311
+ pub outbound_context: OutboundContext,
7288
7312
}
7289
7313
7290
7314
impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
@@ -7327,7 +7351,8 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
7327
7351
holder_signer,
7328
7352
pubkeys,
7329
7353
)?,
7330
- unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 }
7354
+ unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 },
7355
+ outbound_context: OutboundContext::new(),
7331
7356
};
7332
7357
Ok(chan)
7333
7358
}
0 commit comments