Skip to content

What's up with send::v2::Sender #809

@DanGould

Description

@DanGould

First, if there's no common factor between states, why even have a generic container type and not use the State types directly as we once did. It seems like the enum handles what the Sender once did. IMO this is distinct from Receiver where SessionContext is shared between each Receive state.

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Sender<State> {
    pub(crate) state: State,
}

Second, why are we missing a V2PostContext state with ProposalReceived? That one variant strays from the patterns the rest use

pub enum SendSession {
    Uninitialized,
    WithReplyKey(Sender<WithReplyKey>),
    V2GetContext(Sender<V2GetContext>),
    ProposalReceived(Psbt),
    TerminalFailure,
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions