Added missing constructors + pubkey::valid

This commit is contained in:
Peter Conrad 2015-03-13 20:18:15 +01:00
parent 05dee8669f
commit 5782fd42af

View file

@ -56,10 +56,14 @@ namespace fc { namespace ecc {
} }
public_key::~public_key() {} public_key::public_key() {}
public_key::public_key( const public_key &pk ) : my( pk.my ) {}
public_key::public_key( public_key &&pk ) : my( std::move( pk.my ) ) {} public_key::public_key( public_key &&pk ) : my( std::move( pk.my ) ) {}
public_key::~public_key() {}
public_key& public_key::operator=( const public_key& pk ) public_key& public_key::operator=( const public_key& pk )
{ {
my = pk.my; my = pk.my;
@ -72,6 +76,11 @@ namespace fc { namespace ecc {
return *this; return *this;
} }
bool public_key::valid()const
{
return my->_key != empty_pub;
}
public_key public_key::add( const fc::sha256& digest )const public_key public_key::add( const fc::sha256& digest )const
{ {
FC_ASSERT( my->_key != empty_pub ); FC_ASSERT( my->_key != empty_pub );