Esempio n. 1
0
void check_id_equal( const fc::variant& id_a, const fc::variant& id_b )
{
   BOOST_REQUIRE( id_a.get_type() == id_b.get_type() );

   switch( id_a.get_type() )
   {
      case fc::variant::int64_type:
         BOOST_REQUIRE( id_a.as_int64() == id_b.as_int64() );
         break;
      case fc::variant::uint64_type:
         BOOST_REQUIRE( id_a.as_uint64() == id_b.as_uint64() );
         break;
      case fc::variant::string_type:
         BOOST_REQUIRE( id_a.as_string() == id_b.as_string() );
         break;
      case fc::variant::null_type:
         break;
      default:
         BOOST_REQUIRE( false );
   }
}
Esempio n. 2
0
 void from_variant( const fc::variant& var,  bts::blockchain::public_key_type& vo )
 {
     vo = bts::blockchain::public_key_type( var.as_string() );
 }
Esempio n. 3
0
 void from_variant( const fc::variant& var,  graphene::chain::public_key_type& vo )
 {
     vo = graphene::chain::public_key_type( var.as_string() );
 }
Esempio n. 4
0
 inline void from_variant( const fc::variant& var,  steemit::chain::asset& vo ) { vo = steemit::chain::asset::from_string( var.as_string() ); }
Esempio n. 5
0
 void from_variant( const fc::variant& var, graphene::chain::extended_private_key_type& vo )
 {
    vo = graphene::chain::extended_private_key_type( var.as_string() );
 }
Esempio n. 6
0
File: time.cpp Progetto: VicHao/fc
 void from_variant( const fc::variant& v, fc::time_point_sec& t ) {
   t = fc::time_point::from_iso_string(v.as_string());
 }