Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ const SEC_NANOS: u64 = 1_000_000_000;

const THREE_GIGA_BYTES: u64 = 3_221_225_472;

const ARCHIVING_DISABLED_TRIGGER_THRESHOLD: usize = 4_200_000_000;

pub const IC_CANISTER_RUNTIME: IcCanisterRuntime = IcCanisterRuntime {};

thread_local! {
Expand Down Expand Up @@ -991,7 +993,7 @@ fn icrc1_archive_options(
cycles_for_archive_creation: Nat,
) -> ArchiveOptions {
ArchiveOptions {
trigger_threshold: 2_000,
trigger_threshold: ARCHIVING_DISABLED_TRIGGER_THRESHOLD,
num_blocks_to_archive: 1_000,
node_max_memory_size_bytes: Some(THREE_GIGA_BYTES),
max_message_size_bytes: None,
Expand Down
17 changes: 17 additions & 0 deletions rs/ethereum/ledger-suite-orchestrator/src/scheduler/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2134,6 +2134,23 @@ mod validate_upgrade_arg {
}
}

mod icrc1_archive_options {
use crate::scheduler::icrc1_archive_options;
use candid::Nat;
use ic_base_types::PrincipalId;

#[test]
fn should_disable_archiving_for_new_ledger_suites() {
let archive_options = icrc1_archive_options(
PrincipalId::new_user_test_id(1),
vec![PrincipalId::new_user_test_id(2)],
Nat::from(100_000_000_000_000_u64),
);

assert_eq!(archive_options.trigger_threshold, 4_200_000_000);
}
}

mod schema_upgrades {
use crate::scheduler::test_fixtures::usdc_token_id;
use crate::scheduler::{UpgradeLedgerSuite, UpgradeLedgerSuiteSubtask};
Expand Down
Loading