From 49c054bf43c02eb01e878d8edc67aec69a4285be Mon Sep 17 00:00:00 2001 From: "Bill.W" <0xbillw@gmail.com> Date: Thu, 9 May 2024 23:03:20 +0800 Subject: [PATCH] fix: [pallet-tee-worker] confused `Error` use of CesealBin with CesealWorker --- pallets/tee-worker/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pallets/tee-worker/src/lib.rs b/pallets/tee-worker/src/lib.rs index 1d0b826f..7c6d3330 100644 --- a/pallets/tee-worker/src/lib.rs +++ b/pallets/tee-worker/src/lib.rs @@ -200,8 +200,10 @@ pub mod pallet { MasterKeyMismatch, MasterKeyUninitialized, InvalidMasterKeyApplySigningTime, - /// Ceseal related + CesealAlreadyExists, + + CesealBinAlreadyExists, CesealBinNotFound, CannotExitMasterKeyHolder, @@ -682,7 +684,7 @@ pub mod pallet { T::GovernanceOrigin::ensure_origin(origin)?; let mut allowlist = CesealBinAllowList::::get(); - ensure!(!allowlist.contains(&ceseal_hash), Error::::CesealAlreadyExists); + ensure!(!allowlist.contains(&ceseal_hash), Error::::CesealBinAlreadyExists); allowlist.push(ceseal_hash.clone()); CesealBinAllowList::::put(allowlist);