From 26af12395df59415a7d85f25233e1c375b1150e6 Mon Sep 17 00:00:00 2001 From: ViacheslavB Date: Thu, 27 Apr 2023 14:03:15 +0300 Subject: [PATCH] Use cap for suspend list --- src/transaction_executor.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/transaction_executor.rs b/src/transaction_executor.rs index 0b2d407..bcb1003 100644 --- a/src/transaction_executor.rs +++ b/src/transaction_executor.rs @@ -955,14 +955,16 @@ fn compute_new_state( } //Account exists, but can be in different states. AccountStatus::AccStateActive => { - if let Some(suspended_addresses) = config.raw_config().suspended_addresses()? { - let addr = acc.get_addr().ok_or_else(|| error!("active account must have address"))?; - let wc = addr.workchain_id(); - let addr = UInt256::construct_from(&mut addr.address())?; - - if suspended_addresses.is_suspended(wc, addr)? { - log::debug!(target: "executor", "account is suspended"); - return Ok(Some(ComputeSkipReason::Suspended)); + if config.has_capability(GlobalCapabilities::CapSuspendedList) { + if let Some(suspended_addresses) = config.raw_config().suspended_addresses()? { + let addr = acc.get_addr().ok_or_else(|| error!("active account must have address"))?; + let wc = addr.workchain_id(); + let addr = UInt256::construct_from(&mut addr.address())?; + + if suspended_addresses.is_suspended(wc, addr)? { + log::debug!(target: "executor", "account is suspended"); + return Ok(Some(ComputeSkipReason::Suspended)); + } } }