Skip to content

Commit 2a890fc

Browse files
committed
GH-1441 Revert removal of free code on irreversible since we are going to modify free code on last block used to only free if same block
1 parent 429db76 commit 2a890fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libraries/chain/include/eosio/chain/wasm_interface_private.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ struct eosvmoc_tier {
232232
// Anything last used before or on the LIB can be evicted.
233233
const auto first_it = wasm_instantiation_cache.get<by_last_block_num>().begin();
234234
const auto last_it = wasm_instantiation_cache.get<by_last_block_num>().upper_bound(lib);
235+
#ifdef EOSIO_EOS_VM_OC_RUNTIME_ENABLED
236+
if(eosvmoc) for(auto it = first_it; it != last_it; it++)
237+
eosvmoc->cc.free_code(it->code_hash, it->vm_version);
238+
#endif
235239
wasm_instantiation_cache.get<by_last_block_num>().erase(first_it, last_it);
236240
}
237241

0 commit comments

Comments
 (0)