-
Notifications
You must be signed in to change notification settings - Fork 405
[Draft] RefundingChannel: combine FundedChannel and PendingV2Channel using a trait for Pending #3720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👋 I see @wpaulino was un-assigned. |
271a6a2
to
02cc54a
Compare
fn funding(&self) -> &FundingScope; | ||
fn funding_mut(&mut self) -> &mut FundingScope; | ||
fn funding_and_context_mut(&mut self) -> (&mut FundingScope, &mut ChannelContext<SP>); | ||
fn dual_funding_context(&self) -> &DualFundingChannelContext; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we only need to use dual_funding_context
in begin_interactive_funding_tx_construction
? If so, seems like it should be passed into that and consumed rather than needing a method. Then you wouldn't need swap_out_dual_funding_context_inputs
either.
In other words, can DualFundingChannelContext
be constructed immediately before calling begin_interactive_funding_tx_construction
rather than being a field on each channel type?
// TODO Naming | ||
pub(super) trait PendingV2ChannelTrait<SP: Deref> where SP::Target: SignerProvider { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about FundingTxConstruction
?
👋 The first review has been submitted! Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer. |
02cc54a
to
94f6051
Compare
One additional idea to consider, as discussed today: don't introduce new phase/channelstruct, but keep using |
Continued in #3736, closing this one |
This is a simpler version of #3702.
The goal: create a
RefundingChannel
phase, for splice negotiation, that can act both as a funded channel (pre-splice) and pending channel (transaction negotiation).How?
PendingV2ChannelTrait
(name TBD) created, andPendingV2Channel
implements it. Most implememtations are moved from the struct to the traitRefundingChannel
that has aFundedChannel
for the funded, and several fields from pending for the pending.as_funded()
or directly