mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 13:37:57 +00:00
Properly set the max proof size weight on defaults and tests (#12383)
* Properly set the max proof size weight on defaults and tests * cargo fmt * Set proper max proof size for contracts pallet tests * Properly set max proof size for node * Properly set max proof size for frame system mock * Update test expectations * Update test expectations * Properly set max proof size for balances mock * Update test expectations * Update test expectations * Properly set max proof size for democracy mock * Properly set max proof size for scheduler mock * Properly set max proof size for fast unstake mock * Properly set max proof size for tx payment mock * Properly set max proof size for elections phragmen mock * Properly set max proof size for node template
This commit is contained in:
@@ -279,7 +279,9 @@ impl RegisteredChainExtension<Test> for TempStorageExtension {
|
||||
|
||||
parameter_types! {
|
||||
pub BlockWeights: frame_system::limits::BlockWeights =
|
||||
frame_system::limits::BlockWeights::simple_max(2u64 * WEIGHT_PER_SECOND);
|
||||
frame_system::limits::BlockWeights::simple_max(
|
||||
(2u64 * WEIGHT_PER_SECOND).set_proof_size(u64::MAX),
|
||||
);
|
||||
pub static ExistentialDeposit: u64 = 1;
|
||||
}
|
||||
impl frame_system::Config for Test {
|
||||
@@ -413,7 +415,7 @@ pub const BOB: AccountId32 = AccountId32::new([2u8; 32]);
|
||||
pub const CHARLIE: AccountId32 = AccountId32::new([3u8; 32]);
|
||||
pub const DJANGO: AccountId32 = AccountId32::new([4u8; 32]);
|
||||
|
||||
pub const GAS_LIMIT: Weight = Weight::from_ref_time(100_000_000_000);
|
||||
pub const GAS_LIMIT: Weight = Weight::from_ref_time(100_000_000_000).set_proof_size(u64::MAX);
|
||||
|
||||
pub struct ExtBuilder {
|
||||
existential_deposit: u64,
|
||||
@@ -628,7 +630,7 @@ fn deposit_event_max_value_limit() {
|
||||
RuntimeOrigin::signed(ALICE),
|
||||
addr.clone(),
|
||||
0,
|
||||
GAS_LIMIT * 2, // we are copying a huge buffer,
|
||||
GAS_LIMIT.set_ref_time(GAS_LIMIT.ref_time() * 2), // we are copying a huge buffer,
|
||||
None,
|
||||
<Test as Config>::Schedule::get().limits.payload_len.encode(),
|
||||
));
|
||||
@@ -769,7 +771,7 @@ fn storage_max_value_limit() {
|
||||
RuntimeOrigin::signed(ALICE),
|
||||
addr.clone(),
|
||||
0,
|
||||
GAS_LIMIT * 2, // we are copying a huge buffer
|
||||
GAS_LIMIT.set_ref_time(GAS_LIMIT.ref_time() * 2), // we are copying a huge buffer
|
||||
None,
|
||||
<Test as Config>::Schedule::get().limits.payload_len.encode(),
|
||||
));
|
||||
@@ -2543,7 +2545,7 @@ fn gas_estimation_nested_call_fixed_limit() {
|
||||
ALICE,
|
||||
addr_caller,
|
||||
0,
|
||||
Weight::from_ref_time(result.gas_required),
|
||||
Weight::from_ref_time(result.gas_required).set_proof_size(u64::MAX),
|
||||
Some(result.storage_deposit.charge_or_zero()),
|
||||
input,
|
||||
false,
|
||||
@@ -2613,7 +2615,7 @@ fn gas_estimation_call_runtime() {
|
||||
ALICE,
|
||||
addr_caller,
|
||||
0,
|
||||
Weight::from_ref_time(result.gas_required),
|
||||
Weight::from_ref_time(result.gas_required).set_proof_size(u64::MAX),
|
||||
None,
|
||||
call.encode(),
|
||||
false,
|
||||
|
||||
Reference in New Issue
Block a user