Optimize offchain worker memory usage a bit. (#11454)

* add missing events to elections fallback

* Merged

* add some logs and stuff

* undo a bunch of things

* undo lock file

* remove unused err

* fix build
This commit is contained in:
Kian Paimani
2022-05-24 07:23:05 +01:00
committed by GitHub
parent 4f393171d7
commit 494167a05b
7 changed files with 58 additions and 41 deletions
@@ -142,6 +142,11 @@ where
.overwrite_online_at(parent_hash.to_owned());
let builder = if command.overwrite_wasm_code {
log::info!(
target: LOG_TARGET,
"replacing the in-storage :code: with the local code from {}'s chain_spec (your local repo)",
config.chain_spec.name(),
);
let (code_key, code) = extract_code(&config.chain_spec)?;
builder.inject_hashed_key_value(&[(code_key, code)])
} else {
@@ -131,6 +131,11 @@ where
let builder = command.state.builder::<Block>()?;
let builder = if command.overwrite_wasm_code {
log::info!(
target: LOG_TARGET,
"replacing the in-storage :code: with the local code from {}'s chain_spec (your local repo)",
config.chain_spec.name(),
);
let (code_key, code) = extract_code(&config.chain_spec)?;
builder.inject_hashed_key_value(&[(code_key, code)])
} else {