From 50554a62078fe0c6d821daa5a952e7be4b392f22 Mon Sep 17 00:00:00 2001 From: Thibault Martinez Date: Tue, 21 Nov 2023 17:51:05 +0100 Subject: [PATCH] Allow implicit accounts in verify_state_transition --- sdk/src/types/block/output/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sdk/src/types/block/output/mod.rs b/sdk/src/types/block/output/mod.rs index 0f13e5bed2..8352744531 100644 --- a/sdk/src/types/block/output/mod.rs +++ b/sdk/src/types/block/output/mod.rs @@ -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) }