Skip to content

Commit

Permalink
on canister delete / wallet shenanigans, set reserved cycles limit to…
Browse files Browse the repository at this point in the history
… default
  • Loading branch information
ericswanson-dfinity committed Sep 30, 2023
1 parent f8b97f7 commit b7f5497
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dfx/src/commands/canister/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const DANK_PRINCIPAL: Principal =
// "Couldn't send message" when deleting a canister: increase WITHDRAWAL_COST
const WITHDRAWAL_COST: u128 = 10_606_030_000; // 5% higher than a value observed ok locally
const MAX_MEMORY_ALLOCATION: u64 = 8589934592;
const DEFAULT_RESERVED_CYCLES_LIMIT: u128 = 5_000_000_000_000;

/// Deletes a currently stopped canister.
#[derive(Parser)]
Expand Down Expand Up @@ -161,7 +162,9 @@ async fn delete_canister(
compute_allocation: Some(ComputeAllocation::try_from(0u8).unwrap()),
memory_allocation: Some(MemoryAllocation::try_from(MAX_MEMORY_ALLOCATION).unwrap()),
freezing_threshold: Some(FreezingThreshold::try_from(0u8).unwrap()),
reserved_cycles_limit: Some(ReservedCyclesLimit::try_from(0u128).unwrap()),
reserved_cycles_limit: Some(
ReservedCyclesLimit::try_from(DEFAULT_RESERVED_CYCLES_LIMIT).unwrap(),
),
};
info!(log, "Setting the controller to identity principal.");
update_settings(env, canister_id, settings, call_sender).await?;
Expand Down

0 comments on commit b7f5497

Please sign in to comment.