diff --git a/libraries/app/CMakeLists.txt b/libraries/app/CMakeLists.txt index 07d1d43b..4e798712 100644 --- a/libraries/app/CMakeLists.txt +++ b/libraries/app/CMakeLists.txt @@ -11,5 +11,5 @@ target_include_directories( graphene_app PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" ) if(MSVC) - set_source_files_properties( application.cpp PROPERTIES COMPILE_FLAGS "/bigobj" ) + set_source_files_properties( application.cpp api.cpp PROPERTIES COMPILE_FLAGS "/bigobj" ) endif(MSVC) diff --git a/libraries/chain/db_init.cpp b/libraries/chain/db_init.cpp index 4c41e357..e7e8196f 100644 --- a/libraries/chain/db_init.cpp +++ b/libraries/chain/db_init.cpp @@ -479,6 +479,6 @@ void database::init_genesis(const genesis_state_type& genesis_state) }); _undo_db.enable(); -} FC_CAPTURE_AND_RETHROW(()) } +} FC_CAPTURE_AND_RETHROW() } } } diff --git a/libraries/chain/evaluator.cpp b/libraries/chain/evaluator.cpp index 886db279..84490f64 100644 --- a/libraries/chain/evaluator.cpp +++ b/libraries/chain/evaluator.cpp @@ -92,24 +92,30 @@ database& generic_evaluator::db()const { return trx_state->db(); } operation_get_required_authorities( op, other_auths ); for( auto id : active_auths ) + { GRAPHENE_ASSERT( verify_authority(id(db()), authority::active) || verify_authority(id(db()), authority::owner), tx_missing_active_auth, "missing required active authority ${id}", ("id", id)); + } for( auto id : owner_auths ) + { GRAPHENE_ASSERT( verify_authority(id(db()), authority::owner), tx_missing_owner_auth, "missing required owner authority ${id}", ("id", id)); + } for( const auto& auth : other_auths ) + { GRAPHENE_ASSERT( trx_state->check_authority(auth), tx_missing_other_auth, "missing required authority ${auth}", ("auth",auth)("sigs",trx_state->_sigs)); + } } FC_CAPTURE_AND_RETHROW( (op) ) } diff --git a/libraries/chain/include/graphene/chain/exceptions.hpp b/libraries/chain/include/graphene/chain/exceptions.hpp index 5527e434..dadddc87 100644 --- a/libraries/chain/include/graphene/chain/exceptions.hpp +++ b/libraries/chain/include/graphene/chain/exceptions.hpp @@ -20,11 +20,12 @@ #include #include -#define GRAPHENE_ASSERT( expr, exc_type, ... ) \ +#define GRAPHENE_ASSERT( expr, exc_type, FORMAT, ... ) \ + FC_MULTILINE_MACRO_BEGIN \ if( !(expr) ) \ - { \ - FC_THROW_EXCEPTION( exc_type, __VA_ARGS__ ); \ - } + FC_THROW_EXCEPTION( exc_type, FORMAT, __VA_ARGS__ ); \ + FC_MULTILINE_MACRO_END + #define GRAPHENE_DECLARE_OP_BASE_EXCEPTIONS( op_name ) \ FC_DECLARE_DERIVED_EXCEPTION( \