From d4fda9366e659194911150ce76886ea40bec7418 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Date: Thu, 29 Sep 2022 18:17:15 +0300 Subject: [PATCH] tests: Add `proof_size` field for the `Weight` (#673) Signed-off-by: Alexandru Vasile --- testing/integration-tests/src/frame/contracts.rs | 3 +++ testing/integration-tests/src/frame/sudo.rs | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/testing/integration-tests/src/frame/contracts.rs b/testing/integration-tests/src/frame/contracts.rs index 8340bc220e..e0fdbe7b50 100644 --- a/testing/integration-tests/src/frame/contracts.rs +++ b/testing/integration-tests/src/frame/contracts.rs @@ -61,6 +61,7 @@ impl ContractsTestContext { 100_000_000_000_000_000, // endowment Weight { ref_time: 500_000_000_000, + proof_size: 0, }, // gas_limit None, // storage_deposit_limit code, @@ -105,6 +106,7 @@ impl ContractsTestContext { 100_000_000_000_000_000, // endowment Weight { ref_time: 500_000_000_000, + proof_size: 0, }, // gas_limit None, // storage_deposit_limit code_hash, @@ -139,6 +141,7 @@ impl ContractsTestContext { 0, // value Weight { ref_time: 500_000_000, + proof_size: 0, }, // gas_limit None, // storage_deposit_limit input_data, diff --git a/testing/integration-tests/src/frame/sudo.rs b/testing/integration-tests/src/frame/sudo.rs index 2ac0a6875f..9047f56075 100644 --- a/testing/integration-tests/src/frame/sudo.rs +++ b/testing/integration-tests/src/frame/sudo.rs @@ -57,9 +57,13 @@ async fn test_sudo_unchecked_weight() -> Result<(), subxt::Error> { dest: bob, value: 10_000, }); - let tx = node_runtime::tx() - .sudo() - .sudo_unchecked_weight(call, Weight { ref_time: 0 }); + let tx = node_runtime::tx().sudo().sudo_unchecked_weight( + call, + Weight { + ref_time: 0, + proof_size: 0, + }, + ); let found_event = api .tx()