-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Labels
Description
Add an early return if _gstate2.new_ram_per_block == 0 which is the case now:
See also in eos-system-contracts
reference-contracts/contracts/eosio.system/src/eosio.system.cpp
Lines 93 to 109 in 7718066
| void system_contract::update_ram_supply() { | |
| auto cbt = eosio::current_block_time(); | |
| if( cbt <= _gstate2.last_ram_increase ) return; | |
| auto itr = _rammarket.find(ramcore_symbol.raw()); | |
| auto new_ram = (cbt.slot - _gstate2.last_ram_increase.slot)*_gstate2.new_ram_per_block; | |
| _gstate.max_ram_size += new_ram; | |
| /** | |
| * Increase the amount of ram for sale based upon the change in max ram size. | |
| */ | |
| _rammarket.modify( itr, same_payer, [&]( auto& m ) { | |
| m.base.balance.amount += new_ram; | |
| }); | |
| _gstate2.last_ram_increase = cbt; | |
| } |