Skip to content

Commit 3b5b2f2

Browse files
committed
Fix build
1 parent be5211e commit 3b5b2f2

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

rs/nns/constants/src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ pub const SNS_AGGREGATOR_CANISTER_ID: CanisterId =
147147
///
148148
/// As of May 2024, it looks like this is only used by (a whole bunch of) tests, mostly as the
149149
/// argument to send_whitelist.
150-
pub const ALL_NNS_CANISTER_IDS: [&CanisterId; 11] = [
150+
pub const ALL_NNS_CANISTER_IDS: [&CanisterId; 17] = [
151151
&REGISTRY_CANISTER_ID,
152152
&GOVERNANCE_CANISTER_ID,
153153
&LEDGER_CANISTER_ID,
@@ -157,7 +157,13 @@ pub const ALL_NNS_CANISTER_IDS: [&CanisterId; 11] = [
157157
&GENESIS_TOKEN_CANISTER_ID,
158158
&IDENTITY_CANISTER_ID,
159159
&NNS_UI_CANISTER_ID,
160+
&ICP_LEDGER_ARCHIVE_CANISTER_ID,
160161
&SNS_WASM_CANISTER_ID,
162+
&LEDGER_INDEX_CANISTER_ID,
163+
&ICP_LEDGER_ARCHIVE_1_CANISTER_ID,
164+
&SUBNET_RENTAL_CANISTER_ID,
165+
&ICP_LEDGER_ARCHIVE_2_CANISTER_ID,
166+
&ICP_LEDGER_ARCHIVE_3_CANISTER_ID,
161167
&NODE_REWARDS_CANISTER_ID,
162168
];
163169

rs/nns/test_utils/src/itest_helpers.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ use prost::Message;
4444
use registry_canister::init::RegistryCanisterInitPayload;
4545
use std::{future::Future, path::Path, thread, time::SystemTime};
4646

47-
/// All the NNS canisters that exist at genesis.
47+
/// All the NNS canisters that are use in tests, but not all canisters
48+
/// on NNS mainnet (there are 4 ledger archives, for example and a ledger index that aren't tested
49+
/// using this struct)
4850
#[derive(Clone)]
4951
pub struct NnsCanisters<'a> {
5052
// Canisters here are listed in creation order.
@@ -275,7 +277,7 @@ impl NnsCanisters<'_> {
275277
}
276278
}
277279

278-
pub fn all_canisters(&self) -> [&Canister<'_>; NUM_NNS_CANISTERS] {
280+
pub fn all_canisters(&self) -> [&Canister<'_>; 11] {
279281
[
280282
&self.registry,
281283
&self.governance,
@@ -648,7 +650,10 @@ pub async fn install_sns_wasm_canister(
648650
install_rust_canister(canister, "sns-wasm-canister", &[], Some(encoded)).await;
649651
}
650652

651-
pub async fn install_node_rewards_canister(canister: &mut Canister<'_>, init_payload: NodeRewardsInitArgs) {
653+
pub async fn install_node_rewards_canister(
654+
canister: &mut Canister<'_>,
655+
init_payload: NodeRewardsInitArgs,
656+
) {
652657
let encoded = Encode!(&init_payload).unwrap();
653658
install_rust_canister(canister, "node-rewards-canister", &[], Some(encoded)).await;
654659
}

rs/node_rewards/canister/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
use ic_cdk::{init, post_upgrade, pre_upgrade, query, spawn};
1+
#[cfg(any(test, feature = "test"))]
2+
use ic_cdk::query;
3+
use ic_cdk::{init, post_upgrade, pre_upgrade, spawn};
24
use ic_nervous_system_canisters::registry::RegistryCanister;
35
use ic_node_rewards_canister::canister::NodeRewardsCanister;
46
use ic_node_rewards_canister::storage::RegistryStoreStableMemoryBorrower;

0 commit comments

Comments
 (0)