Skip to content

Commit

Permalink
feat(ic-admin): Check the correspondence between arg and `arg_sha25…
Browse files Browse the repository at this point in the history
…6` before submitting install code requests (#1640)

Currently, ic-admin has two code paths for `ProposeToChangeNnsCanister`,
depending on `use_legacy_execute_nns_function`. The correspondence
between the `arg` and `arg_sha256` CLI arguments is checked only in the
legacy flow. The PR fixes that shortcoming.
  • Loading branch information
aterga authored Sep 24, 2024
1 parent 9b24201 commit 7f4cfdf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions rs/registry/admin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1038,11 +1038,7 @@ impl ProposalAction for ProposeToChangeNnsCanisterCmd {
)
.await,
);
let arg = Some(
self.arg
.as_ref()
.map_or(vec![], |path| read_file_fully(path)),
);
let arg = Some(read_arg(&self.arg, &self.arg_sha256));
let skip_stopping_before_installing = Some(self.skip_stopping_before_installing);
let install_mode = match self.mode {
CanisterInstallMode::Install => Some(GovernanceInstallMode::Install as i32),
Expand Down

0 comments on commit 7f4cfdf

Please sign in to comment.