key_object.hpp: Move address_or_key variant to header, reflect it
This commit is contained in:
parent
e814c4dbeb
commit
e934b9cf44
2 changed files with 4 additions and 3 deletions
|
|
@ -22,6 +22,8 @@
|
|||
#include <graphene/chain/types.hpp>
|
||||
|
||||
namespace graphene { namespace chain {
|
||||
typedef static_variant<address,public_key_type> 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<public_key_type>(); }
|
||||
|
||||
static_variant<address,public_key_type> 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) )
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
namespace graphene { namespace chain {
|
||||
address key_object::key_address()const
|
||||
{
|
||||
typedef static_variant<address,public_key_type> address_or_key;
|
||||
|
||||
switch( key_data.which() )
|
||||
{
|
||||
case address_or_key::tag<address>::value:
|
||||
|
|
|
|||
Loading…
Reference in a new issue