From 4ae277321b0dcc6923d7a61523b6cbc0d7cb127b Mon Sep 17 00:00:00 2001 From: Maxim Savenkov Date: Mon, 18 Sep 2023 17:15:36 +0200 Subject: [PATCH] Fix functions that were renamed --- pallets/gear/src/benchmarking/tasks.rs | 12 ++++++------ .../src/benchmarking/tests/syscalls_integrity.rs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pallets/gear/src/benchmarking/tasks.rs b/pallets/gear/src/benchmarking/tasks.rs index 6447b509f01..e1c34d65f1c 100644 --- a/pallets/gear/src/benchmarking/tasks.rs +++ b/pallets/gear/src/benchmarking/tasks.rs @@ -55,7 +55,7 @@ where init_block::(None); let salt = vec![]; - let program_id = ProgramId::generate(CodeId::generate(&code), &salt); + let program_id = ProgramId::generate_from_user(CodeId::generate(&code), &salt); Gear::::upload_program( RawOrigin::Signed(caller).into(), code, @@ -105,7 +105,7 @@ where CurrencyOf::::deposit_creating(&caller, 200_000_000_000_000u128.unique_saturated_into()); let code = benchmarking::generate_wasm2(16.into()).unwrap(); let salt = vec![]; - let program_id = ProgramId::generate(CodeId::generate(&code), &salt); + let program_id = ProgramId::generate_from_user(CodeId::generate(&code), &salt); Gear::::upload_program( RawOrigin::Signed(caller.clone()).into(), code, @@ -145,7 +145,7 @@ where init_block::(None); let salt = vec![]; - let program_id = ProgramId::generate(CodeId::generate(WASM_BINARY), &salt); + let program_id = ProgramId::generate_from_user(CodeId::generate(WASM_BINARY), &salt); Gear::::upload_program( RawOrigin::Signed(caller).into(), WASM_BINARY.to_vec(), @@ -211,7 +211,7 @@ where init_block::(None); let salt = vec![]; - let program_id = ProgramId::generate(CodeId::generate(WASM_BINARY), &salt); + let program_id = ProgramId::generate_from_user(CodeId::generate(WASM_BINARY), &salt); Gear::::upload_program( RawOrigin::Signed(caller.clone()).into(), WASM_BINARY.to_vec(), @@ -266,7 +266,7 @@ where init_block::(None); let salt = vec![]; - let program_id = ProgramId::generate(CodeId::generate(WASM_BINARY), &salt); + let program_id = ProgramId::generate_from_user(CodeId::generate(WASM_BINARY), &salt); Gear::::upload_program( RawOrigin::Signed(caller.clone()).into(), WASM_BINARY.to_vec(), @@ -315,7 +315,7 @@ where init_block::(None); let salt = vec![]; - let program_id = ProgramId::generate(CodeId::generate(WASM_BINARY), &salt); + let program_id = ProgramId::generate_from_user(CodeId::generate(WASM_BINARY), &salt); Gear::::upload_program( RawOrigin::Signed(caller.clone()).into(), WASM_BINARY.to_vec(), diff --git a/pallets/gear/src/benchmarking/tests/syscalls_integrity.rs b/pallets/gear/src/benchmarking/tests/syscalls_integrity.rs index 53ca3334d47..0ee3b9138ac 100644 --- a/pallets/gear/src/benchmarking/tests/syscalls_integrity.rs +++ b/pallets/gear/src/benchmarking/tests/syscalls_integrity.rs @@ -68,7 +68,7 @@ where ) .expect("Failed to upload read_big_state binary"); - let pid = ProgramId::generate(CodeId::generate(WASM_BINARY), salt); + let pid = ProgramId::generate_from_user(CodeId::generate(WASM_BINARY), salt); utils::run_to_next_block::(None); let string = String::from("hi").repeat(4095);