Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

fix RAM billing consensus bug in eosio::setcode native handler #7156

Merged
merged 1 commit into from
Apr 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/chain/eosio_contract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void apply_eosio_setcode(apply_context& context) {
const code_object& old_code_entry = db.get<code_object, by_code_hash>(boost::make_tuple(account.code_hash, account.vm_type, account.vm_version));
EOS_ASSERT( old_code_entry.code_hash != code_hash, set_exact_code,
"contract is already running this version of code" );
int64_t old_size = (int64_t)old_code_entry.code.size() * config::setcode_ram_bytes_multiplier;
old_size = (int64_t)old_code_entry.code.size() * config::setcode_ram_bytes_multiplier;
if( old_code_entry.code_ref_count == 1 ) {
db.remove(old_code_entry);
} else {
Expand Down