@@ -83,7 +83,7 @@ fn subdir_path_from_pubkey(pubkey: &HpkePublicKey) -> ShortId {
8383}
8484
8585/// Represents the various states of a Payjoin receiver session during the protocol flow.
86- /// Each variant wraps a `Receiver` with a specific state type, except for `TerminalState ` which
86+ /// Each variant wraps a `Receiver` with a specific state type, except for `TerminalFailure ` which
8787/// indicates the session has ended or is invalid.
8888#[ derive( Debug , Clone , PartialEq ) ]
8989pub enum ReceiverTypeState {
@@ -97,7 +97,7 @@ pub enum ReceiverTypeState {
9797 WantsInputs ( Receiver < WantsInputs > ) ,
9898 ProvisionalProposal ( Receiver < ProvisionalProposal > ) ,
9999 PayjoinProposal ( Receiver < PayjoinProposal > ) ,
100- TerminalState ,
100+ TerminalFailure ,
101101}
102102
103103impl ReceiverTypeState {
@@ -143,7 +143,7 @@ impl ReceiverTypeState {
143143 ReceiverTypeState :: ProvisionalProposal ( state) ,
144144 SessionEvent :: PayjoinProposal ( payjoin_proposal) ,
145145 ) => Ok ( state. apply_payjoin_proposal ( payjoin_proposal) ) ,
146- ( _, SessionEvent :: SessionInvalid ( _, _) ) => Ok ( ReceiverTypeState :: TerminalState ) ,
146+ ( _, SessionEvent :: SessionInvalid ( _, _) ) => Ok ( ReceiverTypeState :: TerminalFailure ) ,
147147 ( current_state, event) => Err ( InternalReplayError :: InvalidStateAndEvent (
148148 Box :: new ( current_state) ,
149149 Box :: new ( event) ,
0 commit comments