From 667fe6f94a603915d86cfb6bca07adb88bc532e5 Mon Sep 17 00:00:00 2001 From: Shunkichi Sato <49983831+s8sato@users.noreply.github.com> Date: Sat, 2 Nov 2024 19:45:13 +0900 Subject: [PATCH] fix: don't continue to grant a role on failing to register the role Signed-off-by: Shunkichi Sato <49983831+s8sato@users.noreply.github.com> --- crates/iroha_executor/src/default.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/iroha_executor/src/default.rs b/crates/iroha_executor/src/default.rs index c819fce0277..778ae28b12e 100644 --- a/crates/iroha_executor/src/default.rs +++ b/crates/iroha_executor/src/default.rs @@ -1288,7 +1288,7 @@ pub mod role { let grant_role = &Grant::account_role(role.id().clone(), role.grant_to().clone()); let isi = &Register::role(new_role); if let Err(err) = executor.host().submit(isi) { - executor.deny(err); + deny!(executor, err); } execute!(executor, grant_role);