Skip to content

Commit

Permalink
fix: fix remove contract item crash
Browse files Browse the repository at this point in the history
  • Loading branch information
zuuluuz committed Mar 11, 2019
1 parent d26ff47 commit f395c19
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libraries/chain/apply_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ void apply_context::db_remove_i64(int iterator)
--t.count;
});
if (table_obj.count == 0) {
remove_table(table_obj);
if(_db->head_block_time() <= HARDFORK_1020_TIME) {
remove_table(table_obj);
}
}
} else {
update_ram_usage(ram_delta);
Expand Down
5 changes: 5 additions & 0 deletions libraries/chain/include/graphene/chain/hardfork.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@
#define HARDFORK_1019_TIME (fc::time_point_sec( 1552176000 )) // for mainnet, 2019-03-10T00:00:00 UTC
#endif

#ifndef HARDFORK_1020_TIME
// for testnet after this time can not remove contract table
#define HARDFORK_1020_TIME (fc::time_point_sec( 1552381200 )) // for testnet, 2019-03-12T08:00:00(UTC)
#endif

// #413 Add operation to claim asset fees
#ifndef HARDFORK_413_TIME
#define HARDFORK_413_TIME (fc::time_point_sec( 1446652800 ))
Expand Down

0 comments on commit f395c19

Please sign in to comment.