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

Commit

Permalink
Merge pull request #7156 from EOSIO/fix-setcode-ram-billing-bug
Browse files Browse the repository at this point in the history
fix RAM billing consensus bug in eosio::setcode native handler
  • Loading branch information
arhag committed Apr 18, 2019
2 parents d891a76 + bacee72 commit 181086e
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 181086e

Please sign in to comment.