mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-16 17:51:10 +00:00
contracts: Fix seal_call weights (#10796)
* Fix call weights * Fix instantiate benchmark * cargo run --quiet --profile=production --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 * Remove stale and superflous comments * `decrement_refcount` should be infallible * Don't hardcode increment_refcount, decrement_refcount * Rename CopyIn/CopyOut * Fix warning in tests Co-authored-by: Parity Bot <admin@parity.io>
This commit is contained in:
committed by
GitHub
parent
47622d6912
commit
b82cfbac4d
@@ -25,11 +25,8 @@ mod prepare;
|
||||
mod runtime;
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub use self::code_cache::reinstrument;
|
||||
pub use self::{
|
||||
code_cache::{decrement_refcount, increment_refcount},
|
||||
runtime::{ReturnCode, Runtime, RuntimeCosts},
|
||||
};
|
||||
pub use crate::wasm::code_cache::reinstrument;
|
||||
pub use crate::wasm::runtime::{CallFlags, ReturnCode, Runtime, RuntimeCosts};
|
||||
use crate::{
|
||||
exec::{ExecResult, Executable, ExportedFunction, Ext},
|
||||
gas::GasMeter,
|
||||
@@ -201,7 +198,11 @@ where
|
||||
code_cache::load(code_hash, schedule, gas_meter)
|
||||
}
|
||||
|
||||
fn remove_user(code_hash: CodeHash<T>) -> Result<(), DispatchError> {
|
||||
fn add_user(code_hash: CodeHash<T>) -> Result<(), DispatchError> {
|
||||
code_cache::increment_refcount::<T>(code_hash)
|
||||
}
|
||||
|
||||
fn remove_user(code_hash: CodeHash<T>) {
|
||||
code_cache::decrement_refcount::<T>(code_hash)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user