Make benchmarks compile with latest nightly (#7395)

This commit is contained in:
Alexander Theißen
2020-10-26 13:02:10 +01:00
committed by GitHub
parent 653868c01e
commit cfd834be41
6 changed files with 113 additions and 113 deletions
@@ -107,11 +107,11 @@ impl<T: Trait> Contract<T> {
// Endowment should be large but not as large to inhibit rent payments.
let endowment = T::RentDepositOffset::get()
.saturating_mul(storage_size + T::StorageSizeOffset::get().into())
.saturating_sub(1.into());
.saturating_sub(1u32.into());
(storage_size, endowment)
},
Endow::Max => (0.into(), Endow::max::<T>()),
Endow::Max => (0u32.into(), Endow::max::<T>()),
};
T::Currency::make_free_balance_be(&caller, caller_funding::<T>());
let addr = T::DetermineContractAddress::contract_address_for(&module.hash, &data, &caller);
@@ -202,7 +202,7 @@ impl<T: Trait> Tombstone<T> {
let storage_items = create_storage::<T>(stor_num, stor_size)?;
contract.store(&storage_items)?;
System::<T>::set_block_number(
contract.eviction_at()? + T::SignedClaimHandicap::get() + 5.into()
contract.eviction_at()? + T::SignedClaimHandicap::get() + 5u32.into()
);
crate::rent::collect_rent::<T>(&contract.account_id);
contract.ensure_tombstone()?;
@@ -230,7 +230,7 @@ fn create_storage<T: Trait>(
/// The funding that each account that either calls or instantiates contracts is funded with.
fn caller_funding<T: Trait>() -> BalanceOf<T> {
BalanceOf::<T>::max_value() / 2.into()
BalanceOf::<T>::max_value() / 2u32.into()
}
/// Set the block number to one.
@@ -241,7 +241,7 @@ fn caller_funding<T: Trait>() -> BalanceOf<T> {
/// in the setup closure so that both the instantiate and subsequent call are run with the
/// same block number.
fn init_block_number<T: Trait>() {
System::<T>::set_block_number(1.into());
System::<T>::set_block_number(1u32.into());
}
benchmarks! {
@@ -301,12 +301,12 @@ benchmarks! {
let instance = Contract::<T>::with_caller(
whitelisted_caller(), WasmModule::dummy(), vec![], Endow::CollectRent
)?;
let value = T::Currency::minimum_balance() * 100.into();
let value = T::Currency::minimum_balance() * 100u32.into();
let origin = RawOrigin::Signed(instance.caller.clone());
let callee = instance.addr.clone();
// trigger rent collection for worst case performance of call
System::<T>::set_block_number(instance.eviction_at()? - 5.into());
System::<T>::set_block_number(instance.eviction_at()? - 5u32.into());
let before = T::Currency::free_balance(&instance.account_id);
}: _(origin, callee, value, Weight::max_value(), data)
verify {
@@ -339,7 +339,7 @@ benchmarks! {
// generate enough rent so that the contract is evicted
System::<T>::set_block_number(
instance.eviction_at()? + T::SignedClaimHandicap::get() + 5.into()
instance.eviction_at()? + T::SignedClaimHandicap::get() + 5u32.into()
);
}: _(origin, account_id, None)
verify {
@@ -359,7 +359,7 @@ benchmarks! {
"seal_caller", r * API_BENCHMARK_BATCH_SIZE
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_address {
let r in 0 .. API_BENCHMARK_BATCHES;
@@ -367,7 +367,7 @@ benchmarks! {
"seal_address", r * API_BENCHMARK_BATCH_SIZE
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_gas_left {
let r in 0 .. API_BENCHMARK_BATCHES;
@@ -375,7 +375,7 @@ benchmarks! {
"seal_gas_left", r * API_BENCHMARK_BATCH_SIZE
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_balance {
let r in 0 .. API_BENCHMARK_BATCHES;
@@ -383,7 +383,7 @@ benchmarks! {
"seal_balance", r * API_BENCHMARK_BATCH_SIZE
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_value_transferred {
let r in 0 .. API_BENCHMARK_BATCHES;
@@ -391,7 +391,7 @@ benchmarks! {
"seal_value_transferred", r * API_BENCHMARK_BATCH_SIZE
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_minimum_balance {
let r in 0 .. API_BENCHMARK_BATCHES;
@@ -399,7 +399,7 @@ benchmarks! {
"seal_minimum_balance", r * API_BENCHMARK_BATCH_SIZE
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_tombstone_deposit {
let r in 0 .. API_BENCHMARK_BATCHES;
@@ -407,7 +407,7 @@ benchmarks! {
"seal_tombstone_deposit", r * API_BENCHMARK_BATCH_SIZE
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_rent_allowance {
let r in 0 .. API_BENCHMARK_BATCHES;
@@ -415,7 +415,7 @@ benchmarks! {
"seal_rent_allowance", r * API_BENCHMARK_BATCH_SIZE
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_block_number {
let r in 0 .. API_BENCHMARK_BATCHES;
@@ -423,7 +423,7 @@ benchmarks! {
"seal_block_number", r * API_BENCHMARK_BATCH_SIZE
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_now {
let r in 0 .. API_BENCHMARK_BATCHES;
@@ -431,7 +431,7 @@ benchmarks! {
"seal_now", r * API_BENCHMARK_BATCH_SIZE
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_weight_to_fee {
let r in 0 .. API_BENCHMARK_BATCHES;
@@ -457,7 +457,7 @@ benchmarks! {
});
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_gas {
let r in 0 .. API_BENCHMARK_BATCHES;
@@ -476,7 +476,7 @@ benchmarks! {
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// We cannot call seal_input multiple times. Therefore our weight determination is not
// as precise as with other APIs. Because this function can only be called once per
@@ -505,7 +505,7 @@ benchmarks! {
});
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_input_per_kb {
let n in 0 .. code::max_pages::<T>() * 64;
@@ -535,7 +535,7 @@ benchmarks! {
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let data = vec![42u8; (n * 1024).min(buffer_size) as usize];
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), data)
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), data)
// The same argument as for `seal_input` is true here.
seal_return {
@@ -557,7 +557,7 @@ benchmarks! {
});
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_return_per_kb {
let n in 0 .. code::max_pages::<T>() * 64;
@@ -579,7 +579,7 @@ benchmarks! {
});
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// The same argument as for `seal_input` is true here.
seal_terminate {
@@ -609,12 +609,12 @@ benchmarks! {
});
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
assert_eq!(T::Currency::total_balance(&beneficiary), 0.into());
assert_eq!(T::Currency::total_balance(&beneficiary), 0u32.into());
assert_eq!(T::Currency::total_balance(&instance.account_id), Endow::max::<T>());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
verify {
if r > 0 {
assert_eq!(T::Currency::total_balance(&instance.account_id), 0.into());
assert_eq!(T::Currency::total_balance(&instance.account_id), 0u32.into());
assert_eq!(T::Currency::total_balance(&beneficiary), Endow::max::<T>());
}
}
@@ -686,10 +686,10 @@ benchmarks! {
account("origin", 0, 0), code, vec![], Endow::Max
)?;
instance.store(&tombstone.storage)?;
System::<T>::set_block_number(System::<T>::block_number() + 1.into());
System::<T>::set_block_number(System::<T>::block_number() + 1u32.into());
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
verify {
if r > 0 {
tombstone.contract.alive_info()?;
@@ -768,10 +768,10 @@ benchmarks! {
)?;
instance.store(&tombstone.storage)?;
instance.store(&delta)?;
System::<T>::set_block_number(System::<T>::block_number() + 1.into());
System::<T>::set_block_number(System::<T>::block_number() + 1u32.into());
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
verify {
tombstone.contract.alive_info()?;
}
@@ -808,7 +808,7 @@ benchmarks! {
});
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// Overhead of calling the function without any topic.
// We benchmark for the worst case (largest event).
@@ -832,7 +832,7 @@ benchmarks! {
});
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// Benchmark the overhead that topics generate.
// `t`: Number of topics
@@ -870,7 +870,7 @@ benchmarks! {
});
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_set_rent_allowance {
let r in 0 .. API_BENCHMARK_BATCHES;
@@ -898,7 +898,7 @@ benchmarks! {
});
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// Only the overhead of calling the function itself with minimal arguments.
// The contract is a bit more complex because I needs to use different keys in order
@@ -934,7 +934,7 @@ benchmarks! {
});
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_set_storage_per_kb {
let n in 0 .. T::MaxValueSize::get() / 1024;
@@ -963,7 +963,7 @@ benchmarks! {
});
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// Similar to seal_set_storage. However, we store all the keys that we are about to
// delete beforehand in order to prevent any optimizations that could occur when
@@ -1007,7 +1007,7 @@ benchmarks! {
.map_err(|_| "Failed to write to storage during setup.")?;
}
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// We make sure that all storage accesses are to unique keys.
seal_get_storage {
@@ -1053,7 +1053,7 @@ benchmarks! {
.map_err(|_| "Failed to write to storage during setup.")?;
}
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_get_storage_per_kb {
let n in 0 .. T::MaxValueSize::get() / 1024;
@@ -1096,7 +1096,7 @@ benchmarks! {
)
.map_err(|_| "Failed to write to storage during setup.")?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// We transfer to unique accounts.
seal_transfer {
@@ -1107,7 +1107,7 @@ benchmarks! {
let account_len = accounts.get(0).map(|i| i.encode().len()).unwrap_or(0);
let account_bytes = accounts.iter().flat_map(|x| x.encode()).collect();
let value = Config::<T>::subsistence_threshold_uncached();
assert!(value > 0.into());
assert!(value > 0u32.into());
let value_bytes = value.encode();
let value_len = value_bytes.len();
use body::CountedInstruction::{Counter, Regular};
@@ -1141,9 +1141,9 @@ benchmarks! {
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
for account in &accounts {
assert_eq!(T::Currency::total_balance(account), 0.into());
assert_eq!(T::Currency::total_balance(account), 0u32.into());
}
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
verify {
for account in &accounts {
assert_eq!(T::Currency::total_balance(account), value);
@@ -1159,7 +1159,7 @@ benchmarks! {
.collect::<Result<Vec<_>, _>>()?;
let callee_len = callees.get(0).map(|i| i.account_id.encode().len()).unwrap_or(0);
let callee_bytes = callees.iter().flat_map(|x| x.account_id.encode()).collect();
let value: BalanceOf<T> = 0.into();
let value: BalanceOf<T> = 0u32.into();
let value_bytes = value.encode();
let value_len = value_bytes.len();
use body::CountedInstruction::{Counter, Regular};
@@ -1207,7 +1207,7 @@ benchmarks! {
});
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
seal_call_per_transfer_input_output_kb {
let t in 0 .. 1;
@@ -1291,7 +1291,7 @@ benchmarks! {
});
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// We assume that every instantiate sends at least the subsistence amount.
seal_instantiate {
@@ -1314,7 +1314,7 @@ benchmarks! {
let hashes_bytes = hashes.iter().flat_map(|x| x.encode()).collect::<Vec<_>>();
let hashes_len = hashes_bytes.len();
let value = Config::<T>::subsistence_threshold_uncached();
assert!(value > 0.into());
assert!(value > 0u32.into());
let value_bytes = value.encode();
let value_len = value_bytes.len();
let addr_len = sp_std::mem::size_of::<T::AccountId>();
@@ -1391,7 +1391,7 @@ benchmarks! {
return Err("Expected that contract does not exist at this point.");
}
}
}: call(origin, callee, 0.into(), Weight::max_value(), vec![])
}: call(origin, callee, 0u32.into(), Weight::max_value(), vec![])
verify {
for addr in &addresses {
instance.alive_info()?;
@@ -1430,7 +1430,7 @@ benchmarks! {
let input_bytes = inputs.iter().cloned().flatten().collect::<Vec<_>>();
let inputs_len = input_bytes.len();
let value = Config::<T>::subsistence_threshold_uncached();
assert!(value > 0.into());
assert!(value > 0u32.into());
let value_bytes = value.encode();
let value_len = value_bytes.len();
let addr_len = sp_std::mem::size_of::<T::AccountId>();
@@ -1509,7 +1509,7 @@ benchmarks! {
});
let instance = Contract::<T>::new(code, vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// Only the overhead of calling the function itself with minimal arguments.
seal_hash_sha2_256 {
@@ -1518,7 +1518,7 @@ benchmarks! {
"seal_hash_sha2_256", r * API_BENCHMARK_BATCH_SIZE, 0,
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// `n`: Input to hash in kilobytes
seal_hash_sha2_256_per_kb {
@@ -1527,7 +1527,7 @@ benchmarks! {
"seal_hash_sha2_256", API_BENCHMARK_BATCH_SIZE, n * 1024,
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// Only the overhead of calling the function itself with minimal arguments.
seal_hash_keccak_256 {
@@ -1536,7 +1536,7 @@ benchmarks! {
"seal_hash_keccak_256", r * API_BENCHMARK_BATCH_SIZE, 0,
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// `n`: Input to hash in kilobytes
seal_hash_keccak_256_per_kb {
@@ -1545,7 +1545,7 @@ benchmarks! {
"seal_hash_keccak_256", API_BENCHMARK_BATCH_SIZE, n * 1024,
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// Only the overhead of calling the function itself with minimal arguments.
seal_hash_blake2_256 {
@@ -1554,7 +1554,7 @@ benchmarks! {
"seal_hash_blake2_256", r * API_BENCHMARK_BATCH_SIZE, 0,
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// `n`: Input to hash in kilobytes
seal_hash_blake2_256_per_kb {
@@ -1563,7 +1563,7 @@ benchmarks! {
"seal_hash_blake2_256", API_BENCHMARK_BATCH_SIZE, n * 1024,
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// Only the overhead of calling the function itself with minimal arguments.
seal_hash_blake2_128 {
@@ -1572,7 +1572,7 @@ benchmarks! {
"seal_hash_blake2_128", r * API_BENCHMARK_BATCH_SIZE, 0,
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
// `n`: Input to hash in kilobytes
seal_hash_blake2_128_per_kb {
@@ -1581,7 +1581,7 @@ benchmarks! {
"seal_hash_blake2_128", API_BENCHMARK_BATCH_SIZE, n * 1024,
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0.into(), Weight::max_value(), vec![])
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])
}
#[cfg(test)]