Skip to content

Commit

Permalink
Remove temporary code (#6806)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Nov 13, 2024
1 parent 3d3fd9f commit 0226920
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@ fn post_upgrade(args: Args) {
let memory = get_upgrades_memory();
let reader = get_reader(&memory);

let (mut data, errors, logs, traces): (Data, Vec<LogEntry>, Vec<LogEntry>, Vec<LogEntry>) =
let (data, errors, logs, traces): (Data, Vec<LogEntry>, Vec<LogEntry>, Vec<LogEntry>) =
msgpack::deserialize(reader).unwrap();

if !data.test_mode {
data.canister_pool.set_target_size(20);
}

canister_logger::init_with_logs(data.test_mode, errors, logs, traces);

let env = init_env(data.rng_seed);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::lifecycle::{init_env, init_state};
use crate::memory::get_upgrades_memory;
use crate::Data;
use candid::Principal;
use canister_logger::LogEntry;
use canister_tracing_macros::trace;
use ic_cdk::post_upgrade;
Expand All @@ -16,16 +15,9 @@ fn post_upgrade(args: Args) {
let memory = get_upgrades_memory();
let reader = get_reader(&memory);

let (mut data, errors, logs, traces): (Data, Vec<LogEntry>, Vec<LogEntry>, Vec<LogEntry>) =
let (data, errors, logs, traces): (Data, Vec<LogEntry>, Vec<LogEntry>, Vec<LogEntry>) =
msgpack::deserialize(reader).unwrap();

data.canisters_pending_events_migration_to_stable_memory =
data.local_users.iter().map(|(u, _)| Principal::from(*u)).collect();

if !data.test_mode {
data.canister_pool.set_target_size(20);
}

canister_logger::init_with_logs(data.test_mode, errors, logs, traces);

let env = init_env(data.rng_seed);
Expand Down

0 comments on commit 0226920

Please sign in to comment.