Skip to content

Commit

Permalink
Use cap for suspend list
Browse files Browse the repository at this point in the history
  • Loading branch information
bvscd authored Apr 27, 2023
1 parent 19e6e61 commit 26af123
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/transaction_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}

Expand Down

0 comments on commit 26af123

Please sign in to comment.