提交 7ea4135e 编写于 作者: T Todd Fleming

state history: remove probably-not-externally-useful tables

上级 36bc2a73
......@@ -14,7 +14,6 @@
#include <eosio/chain/resource_limits.hpp>
#include <eosio/chain/resource_limits_private.hpp>
#include <eosio/chain/trace.hpp>
#include <eosio/chain/transaction_object.hpp>
#include <eosio/chain_plugin/chain_plugin.hpp>
template <typename T>
......@@ -80,19 +79,6 @@ datastream<ST>& operator<<(datastream<ST>& ds, const history_serial_wrapper<eosi
return ds;
}
template <typename ST>
datastream<ST>& operator<<(datastream<ST>& ds,
const history_serial_wrapper<eosio::chain::account_sequence_object>& obj) {
fc::raw::pack(ds, fc::unsigned_int(0));
fc::raw::pack(ds, as_type<uint64_t>(obj.obj.id._id));
fc::raw::pack(ds, as_type<uint64_t>(obj.obj.name.value));
fc::raw::pack(ds, as_type<uint64_t>(obj.obj.recv_sequence));
fc::raw::pack(ds, as_type<uint64_t>(obj.obj.auth_sequence));
fc::raw::pack(ds, as_type<uint64_t>(obj.obj.code_sequence));
fc::raw::pack(ds, as_type<uint64_t>(obj.obj.abi_sequence));
return ds;
}
template <typename ST>
datastream<ST>& operator<<(datastream<ST>& ds, const history_serial_wrapper<eosio::chain::table_id_object>& obj) {
fc::raw::pack(ds, fc::unsigned_int(0));
......@@ -230,24 +216,6 @@ datastream<ST>& operator<<(datastream<ST>&
return ds;
}
template <typename ST>
datastream<ST>& operator<<(datastream<ST>& ds,
const history_serial_wrapper<eosio::chain::dynamic_global_property_object>& obj) {
fc::raw::pack(ds, fc::unsigned_int(0));
fc::raw::pack(ds, as_type<uint64_t>(obj.obj.id._id));
fc::raw::pack(ds, as_type<uint64_t>(obj.obj.global_action_sequence));
return ds;
}
template <typename ST>
datastream<ST>& operator<<(datastream<ST>& ds, const history_serial_wrapper<eosio::chain::transaction_object>& obj) {
fc::raw::pack(ds, fc::unsigned_int(0));
fc::raw::pack(ds, as_type<uint64_t>(obj.obj.id._id));
fc::raw::pack(ds, as_type<fc::time_point_sec>(obj.obj.expiration));
fc::raw::pack(ds, as_type<eosio::chain::transaction_id_type>(obj.obj.trx_id));
return ds;
}
template <typename ST>
datastream<ST>& operator<<(datastream<ST>& ds,
const history_serial_wrapper<eosio::chain::generated_transaction_object>& obj) {
......@@ -320,15 +288,6 @@ datastream<ST>& operator<<(datastream<ST>& ds, const history_serial_wrapper<eosi
return ds;
}
template <typename ST>
datastream<ST>& operator<<(datastream<ST>& ds,
const history_serial_wrapper<eosio::chain::permission_usage_object>& obj) {
fc::raw::pack(ds, fc::unsigned_int(0));
fc::raw::pack(ds, as_type<uint64_t>(obj.obj.id._id));
fc::raw::pack(ds, as_type<fc::time_point>(obj.obj.last_used));
return ds;
}
template <typename ST>
datastream<ST>& operator<<(datastream<ST>& ds,
const history_serial_wrapper<eosio::chain::permission_link_object>& obj) {
......
......@@ -29,7 +29,6 @@ static appbase::abstract_plugin& _state_history_plugin = app().register_plugin<s
template <typename F>
static void for_each_table(const chainbase::database& db, F f) {
f("account", db.get_index<account_index>(), [](auto&) { return true; });
f("account_sequence", db.get_index<account_sequence_index>(), [](auto&) { return true; });
f("table_id", db.get_index<table_id_multi_index>(), [](auto&) { return true; });
f("key_value", db.get_index<key_value_index>(), [](auto&) { return true; });
......@@ -40,12 +39,9 @@ static void for_each_table(const chainbase::database& db, F f) {
f("index_long_double", db.get_index<index_long_double_index>(), [](auto&) { return true; });
f("global_property", db.get_index<global_property_multi_index>(), [](auto&) { return true; });
f("dynamic_global_property", db.get_index<dynamic_global_property_multi_index>(), [](auto&) { return true; });
f("transaction", db.get_index<transaction_multi_index>(), [](auto&) { return true; });
f("generated_transaction", db.get_index<generated_transaction_multi_index>(), [](auto&) { return true; });
f("permission", db.get_index<permission_index>(), [](auto&) { return true; });
f("permission_usage", db.get_index<permission_usage_index>(), [](auto&) { return true; });
f("permission_link", db.get_index<permission_link_index>(), [](auto&) { return true; });
f("resource_limits", db.get_index<resource_limits::resource_limits_index>(), [](auto&) { return true; });
......
......@@ -160,16 +160,6 @@ extern const char* const state_history_plugin_abi = R"({
{ "type": "bytes", "name": "abi" }
]
},
{
"name": "account_sequence_v0", "fields": [
{ "type": "uint64", "name": "id" },
{ "type": "name", "name": "name" },
{ "type": "uint64", "name": "recv_sequence" },
{ "type": "uint64", "name": "auth_sequence" },
{ "type": "uint64", "name": "code_sequence" },
{ "type": "uint64", "name": "abi_sequence" }
]
},
{
"name": "table_id_v0", "fields": [
{ "type": "uint64", "name": "id" },
......@@ -281,19 +271,6 @@ extern const char* const state_history_plugin_abi = R"({
{ "type": "chain_config", "name": "configuration" }
]
},
{
"name": "dynamic_global_property_v0", "fields": [
{ "type": "uint64", "name": "id" },
{ "type": "uint64", "name": "global_action_sequence" }
]
},
{
"name": "transaction_v0", "fields": [
{ "type": "uint64", "name": "id" },
{ "type": "time_point_sec", "name": "expiration" },
{ "type": "checksum256", "name": "trx_id" }
]
},
{
"name": "generated_transaction_v0", "fields": [
{ "type": "uint64", "name": "id" },
......@@ -350,12 +327,6 @@ extern const char* const state_history_plugin_abi = R"({
{ "type": "shared_authority", "name": "auth" }
]
},
{
"name": "permission_usage_v0", "fields": [
{ "type": "uint64", "name": "id" },
{ "type": "time_point", "name": "last_used" }
]
},
{
"name": "permission_link_v0", "fields": [
{ "type": "uint64", "name": "id" },
......@@ -446,7 +417,6 @@ extern const char* const state_history_plugin_abi = R"({
{ "name": "table_delta", "types": ["table_delta_v0"] },
{ "name": "account", "types": ["account_v0"] },
{ "name": "account_sequence", "types": ["account_sequence_v0"] },
{ "name": "table_id", "types": ["table_id_v0"] },
{ "name": "key_value", "types": ["key_value_v0"] },
{ "name": "index64", "types": ["index64_v0"] },
......@@ -456,8 +426,6 @@ extern const char* const state_history_plugin_abi = R"({
{ "name": "index_long_double", "types": ["index_long_double_v0"] },
{ "name": "chain_config", "types": ["chain_config_v0"] },
{ "name": "global_property", "types": ["global_property_v0"] },
{ "name": "dynamic_global_property", "types": ["dynamic_global_property_v0"] },
{ "name": "transaction", "types": ["transaction_v0"] },
{ "name": "generated_transaction", "types": ["generated_transaction_v0"] },
{ "name": "key_weight", "types": ["key_weight_v0"] },
{ "name": "permission_level", "types": ["permission_level_v0"] },
......@@ -465,7 +433,6 @@ extern const char* const state_history_plugin_abi = R"({
{ "name": "wait_weight", "types": ["wait_weight_v0"] },
{ "name": "shared_authority", "types": ["shared_authority_v0"] },
{ "name": "permission", "types": ["permission_v0"] },
{ "name": "permission_usage", "types": ["permission_usage_v0"] },
{ "name": "permission_link", "types": ["permission_link_v0"] },
{ "name": "resource_limits", "types": ["resource_limits_v0"] },
{ "name": "usage_accumulator", "types": ["usage_accumulator_v0"] },
......@@ -477,7 +444,6 @@ extern const char* const state_history_plugin_abi = R"({
],
"tables": [
{ "name": "account", "type": "account" },
{ "name": "account_sequence", "type": "account_sequence" },
{ "name": "table_id", "type": "table_id" },
{ "name": "key_value", "type": "key_value" },
{ "name": "index64", "type": "index64" },
......@@ -486,11 +452,9 @@ extern const char* const state_history_plugin_abi = R"({
{ "name": "index_double", "type": "index_double" },
{ "name": "index_long_double", "type": "index_long_double" },
{ "name": "global_property", "type": "global_property" },
{ "name": "dynamic_global_property", "type": "dynamic_global_property" },
{ "name": "transaction", "type": "transaction" },
{ "name": "generated_transaction", "type": "generated_transaction" },
{ "name": "permission", "type": "permission" },
{ "name": "permission_usage", "type": "permission_usage" },
{ "name": "permission_link", "type": "permission_link" },
{ "name": "resource_limits", "type": "resource_limits" },
{ "name": "resource_usage", "type": "resource_usage" },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册