Skip to content

SessionHistory should always have one element #1046

@arminsabouri

Description

@arminsabouri

Several public session history methods currently mistakenly return Option<T> because replaying a SEL with no events is valid, leaving the session in an Uninitialized state. PR #1014 removes the Uninitialized variant and enforces that every SEL must contain at least one event. After we remove the Unintialized state, we can remove the optional return type of session history methods that read from the first event. e.g fallback_tx and pj_param for the sender and session_context() & pj_uri() for the receiver.

Metadata

Metadata

Assignees

Labels

apireceivereceiving payjoinsendsending payjoin

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions