diff --git a/libraries/chain/include/graphene/chain/key_object.hpp b/libraries/chain/include/graphene/chain/key_object.hpp index 3a9d07da..7daaa5ab 100644 --- a/libraries/chain/include/graphene/chain/key_object.hpp +++ b/libraries/chain/include/graphene/chain/key_object.hpp @@ -22,6 +22,8 @@ #include namespace graphene { namespace chain { + typedef static_variant address_or_key; + /** * @class key_object * @brief maps an ID to a public key or address @@ -38,8 +40,9 @@ namespace graphene { namespace chain { address key_address()const; const public_key_type& key()const { return key_data.get(); } - static_variant key_data; + address_or_key key_data; }; } } +FC_REFLECT_TYPENAME( graphene::chain::address_or_key ) FC_REFLECT_DERIVED( graphene::chain::key_object, (graphene::db::object), (key_data) ) diff --git a/libraries/chain/key_object.cpp b/libraries/chain/key_object.cpp index a0a79fe8..d19eabba 100644 --- a/libraries/chain/key_object.cpp +++ b/libraries/chain/key_object.cpp @@ -21,8 +21,6 @@ namespace graphene { namespace chain { address key_object::key_address()const { - typedef static_variant address_or_key; - switch( key_data.which() ) { case address_or_key::tag
::value: