Reasons: 1. The protocol should not depend upon implementation details such as how the database objects are structured or reflected 2. The protocol should deal in abstract concepts 3. Should use fc::datastream rather than istringstream for performance and memory allocation reasons 4. Fees should be charged proportional to the size of the operation 5. Validate on the assert operation should also perform sanity checks on types 6. Protocol definition objects should never depend upon the database because they may be used in situations where the database and evaluators are not present. 7. Reflected field names should never have '_' in them because they become part of the *PUBLIC* json definition.
62 lines
1.7 KiB
CMake
62 lines
1.7 KiB
CMake
file(GLOB HEADERS "include/graphene/chain/*.hpp")
|
|
|
|
## SORT .cpp by most likely to change / break compile
|
|
add_library( graphene_chain
|
|
types.cpp
|
|
type_id.cpp
|
|
|
|
address.cpp
|
|
asset.cpp
|
|
|
|
operations.cpp
|
|
|
|
evaluator.cpp
|
|
global_parameters_evaluator.cpp
|
|
account_evaluator.cpp
|
|
assert_evaluator.cpp
|
|
witness_evaluator.cpp
|
|
delegate_evaluator.cpp
|
|
asset_evaluator.cpp
|
|
transfer_evaluator.cpp
|
|
proposal_evaluator.cpp
|
|
call_order_evaluator.cpp
|
|
limit_order_evaluator.cpp
|
|
vesting_balance_evaluator.cpp
|
|
withdraw_permission_evaluator.cpp
|
|
worker_evaluator.cpp
|
|
|
|
key_object.cpp
|
|
account_object.cpp
|
|
asset_object.cpp
|
|
proposal_object.cpp
|
|
vesting_balance_object.cpp
|
|
worker_object.cpp
|
|
|
|
transaction.cpp
|
|
block.cpp
|
|
|
|
transaction_evaluation_state.cpp
|
|
fork_database.cpp
|
|
block_database.cpp
|
|
|
|
db_balance.cpp
|
|
db_block.cpp
|
|
db_debug.cpp
|
|
db_getter.cpp
|
|
db_init.cpp
|
|
db_maint.cpp
|
|
db_management.cpp
|
|
db_market.cpp
|
|
db_update.cpp
|
|
db_witness_schedule.cpp
|
|
|
|
${HEADERS}
|
|
)
|
|
|
|
target_link_libraries( graphene_chain fc graphene_db )
|
|
target_include_directories( graphene_chain
|
|
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" )
|
|
|
|
if(MSVC)
|
|
set_source_files_properties( db_init.cpp db_block.cpp PROPERTIES COMPILE_FLAGS "/bigobj" )
|
|
endif(MSVC)
|