From bacee727f4e1f3e75f3b736cf7f5846018c34742 Mon Sep 17 00:00:00 2001 From: arhag Date: Thu, 18 Apr 2019 10:41:07 -0400 Subject: [PATCH] just one spurious keyword was all it took to cause consensus failure; aren't blockchains fun?! --- libraries/chain/eosio_contract.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/chain/eosio_contract.cpp b/libraries/chain/eosio_contract.cpp index 9b6b157984a..1fe849abb48 100644 --- a/libraries/chain/eosio_contract.cpp +++ b/libraries/chain/eosio_contract.cpp @@ -157,7 +157,7 @@ void apply_eosio_setcode(apply_context& context) { const code_object& old_code_entry = db.get(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 {