Skip to content

Commit

Permalink
contracts: Remove ConfigCache (paritytech#8047)
Browse files Browse the repository at this point in the history
* contracts: Remove ConfigCache

* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* Fixup test

Co-authored-by: Parity Benchmarking Bot <[email protected]>
  • Loading branch information
athei and Parity Benchmarking Bot authored Feb 5, 2021
1 parent 09ba69f commit f14488d
Show file tree
Hide file tree
Showing 7 changed files with 696 additions and 741 deletions.
2 changes: 1 addition & 1 deletion bin/node/executor/tests/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ fn deploying_wasm_contract_should_work() {
&[],
);

let subsistence = pallet_contracts::ConfigCache::<Runtime>::subsistence_threshold_uncached();
let subsistence = pallet_contracts::Module::<Runtime>::subsistence_threshold();

let b = construct_block(
&mut new_test_ext(compact_code_unwrap(), false),
Expand Down
2 changes: 1 addition & 1 deletion frame/contracts/src/benchmarking/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ benchmarks! {
.collect::<Vec<_>>();
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 = ConfigCache::<T>::subsistence_threshold_uncached();
let value = Contracts::<T>::subsistence_threshold();
assert!(value > 0u32.into());
let value_bytes = value.encode();
let value_len = value_bytes.len();
Expand Down
Loading

0 comments on commit f14488d

Please sign in to comment.