diff --git a/libraries/chain/account_evaluator.cpp b/libraries/chain/account_evaluator.cpp index eb248611..3fd2b0ec 100644 --- a/libraries/chain/account_evaluator.cpp +++ b/libraries/chain/account_evaluator.cpp @@ -22,7 +22,7 @@ namespace graphene { namespace chain { -object_id_type account_create_evaluator::do_evaluate( const account_create_operation& op ) +void_result account_create_evaluator::do_evaluate( const account_create_operation& op ) { try { FC_ASSERT( db().find_object(op.voting_account) ); FC_ASSERT( is_relative(op.memo_key) || db().find_object(op.memo_key) ); @@ -97,7 +97,7 @@ object_id_type account_create_evaluator::do_evaluate( const account_create_opera FC_ASSERT( op.owner.auths.find( parent_account_itr->id ) != op.owner.auths.end() ); } - return object_id_type(); + return void_result(); } FC_CAPTURE_AND_RETHROW( (op) ) } object_id_type account_create_evaluator::do_apply( const account_create_operation& o ) @@ -136,7 +136,7 @@ object_id_type account_create_evaluator::do_apply( const account_create_operatio } FC_CAPTURE_AND_RETHROW((o)) } -object_id_type account_update_evaluator::do_evaluate( const account_update_operation& o ) +void_result account_update_evaluator::do_evaluate( const account_update_operation& o ) { database& d = db(); @@ -174,9 +174,9 @@ object_id_type account_update_evaluator::do_evaluate( const account_update_opera } } - return object_id_type(); + return void_result(); } -object_id_type account_update_evaluator::do_apply( const account_update_operation& o ) +void_result account_update_evaluator::do_apply( const account_update_operation& o ) { db().modify( *acnt, [&]( account_object& a ){ if( o.owner ) a.owner = *o.owner; @@ -192,10 +192,10 @@ object_id_type account_update_evaluator::do_apply( const account_update_operatio a.num_witness = o.num_witness; a.num_committee = o.num_committee; }); - return object_id_type(); + return void_result(); } -object_id_type account_whitelist_evaluator::do_evaluate(const account_whitelist_operation& o) +void_result account_whitelist_evaluator::do_evaluate(const account_whitelist_operation& o) { try { database& d = db(); @@ -203,10 +203,10 @@ object_id_type account_whitelist_evaluator::do_evaluate(const account_whitelist_ if( !d.get_global_properties().parameters.allow_non_prime_whitelists ) FC_ASSERT(listed_account->is_prime()); - return object_id_type(); + return void_result(); } FC_CAPTURE_AND_RETHROW( (o) ) } -object_id_type account_whitelist_evaluator::do_apply(const account_whitelist_operation& o) +void_result account_whitelist_evaluator::do_apply(const account_whitelist_operation& o) { database& d = db(); @@ -221,7 +221,7 @@ object_id_type account_whitelist_evaluator::do_apply(const account_whitelist_ope a.blacklisting_accounts.erase(o.authorizing_account); }); - return object_id_type(); + return void_result(); } } } // graphene::chain diff --git a/libraries/chain/include/graphene/chain/account_evaluator.hpp b/libraries/chain/include/graphene/chain/account_evaluator.hpp index 7ed78cae..8520769c 100644 --- a/libraries/chain/include/graphene/chain/account_evaluator.hpp +++ b/libraries/chain/include/graphene/chain/account_evaluator.hpp @@ -26,7 +26,7 @@ namespace graphene { namespace chain { public: typedef account_create_operation operation_type; - object_id_type do_evaluate( const account_create_operation& o ); + void_result do_evaluate( const account_create_operation& o ); object_id_type do_apply( const account_create_operation& o ) ; }; @@ -35,8 +35,8 @@ namespace graphene { namespace chain { public: typedef account_update_operation operation_type; - object_id_type do_evaluate( const account_update_operation& o ); - object_id_type do_apply( const account_update_operation& o ); + void_result do_evaluate( const account_update_operation& o ); + void_result do_apply( const account_update_operation& o ); const account_object* acnt; }; @@ -46,8 +46,8 @@ namespace graphene { namespace chain { public: typedef account_whitelist_operation operation_type; - object_id_type do_evaluate( const account_whitelist_operation& o); - object_id_type do_apply( const account_whitelist_operation& o); + void_result do_evaluate( const account_whitelist_operation& o); + void_result do_apply( const account_whitelist_operation& o); const account_object* listed_account; }; diff --git a/libraries/chain/include/graphene/chain/transfer_evaluator.hpp b/libraries/chain/include/graphene/chain/transfer_evaluator.hpp index f871ff69..c7551cee 100644 --- a/libraries/chain/include/graphene/chain/transfer_evaluator.hpp +++ b/libraries/chain/include/graphene/chain/transfer_evaluator.hpp @@ -27,8 +27,8 @@ namespace graphene { namespace chain { public: typedef transfer_operation operation_type; - object_id_type do_evaluate( const transfer_operation& o ); - object_id_type do_apply( const transfer_operation& o ); + void_result do_evaluate( const transfer_operation& o ); + void_result do_apply( const transfer_operation& o ); }; } } // graphene::chain diff --git a/libraries/chain/transfer_evaluator.cpp b/libraries/chain/transfer_evaluator.cpp index 3a3d84a5..1bd28153 100644 --- a/libraries/chain/transfer_evaluator.cpp +++ b/libraries/chain/transfer_evaluator.cpp @@ -19,7 +19,7 @@ #include namespace graphene { namespace chain { -object_id_type transfer_evaluator::do_evaluate( const transfer_operation& op ) +void_result transfer_evaluator::do_evaluate( const transfer_operation& op ) { try { database& d = db(); @@ -43,13 +43,13 @@ object_id_type transfer_evaluator::do_evaluate( const transfer_operation& op ) FC_ASSERT( d.get_balance( &from_account, &asset_type ).amount >= op.amount.amount, "", ("total_transfer",op.amount)("balance",d.get_balance(&from_account, &asset_type).amount) ); - return object_id_type(); + return void_result(); } FC_CAPTURE_AND_RETHROW( (op) ) } -object_id_type transfer_evaluator::do_apply( const transfer_operation& o ) +void_result transfer_evaluator::do_apply( const transfer_operation& o ) { try { db().adjust_balance( o.from, -o.amount ); db().adjust_balance( o.to, o.amount ); - return object_id_type(); + return void_result(); } FC_CAPTURE_AND_RETHROW( (o) )} } } // graphene::chain