Skip to content

Commit

Permalink
Allow implicit accounts in verify_state_transition
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Nov 21, 2023
1 parent e450a2e commit 50554a6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sdk/src/types/block/output/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,14 @@ impl Output {
(None, Some(Self::Delegation(next_state))) => DelegationOutput::creation(next_state, context),

// Transitions.
(Some(Self::Basic(current_state)), Some(Self::Account(_next_state))) => {
if !current_state.is_implicit_account() {
Err(StateTransitionError::UnsupportedStateTransition)
} else {
// TODO
Ok(())
}
}
(Some(Self::Account(current_state)), Some(Self::Account(next_state))) => {
AccountOutput::transition(current_state, next_state, context)
}
Expand Down

0 comments on commit 50554a6

Please sign in to comment.