This commit is contained in:
Peter Conrad 2018-03-23 12:14:18 +01:00 committed by Fabian Schuh
parent 86fdba0782
commit 8c0fcf9db8
No known key found for this signature in database
GPG key ID: F2538A4B282D6238

View file

@ -658,13 +658,10 @@ operation_result database::apply_operation(transaction_evaluation_state& eval_st
{ try { { try {
int i_which = op.which(); int i_which = op.which();
uint64_t u_which = uint64_t( i_which ); uint64_t u_which = uint64_t( i_which );
if( i_which < 0 ) FC_ASSERT( i_which >= 0, "Negative operation tag in operation ${op}", ("op",op) );
assert( "Negative operation tag" && false ); FC_ASSERT( u_which < _operation_evaluators.size(), "No registered evaluator for operation ${op}", ("op",op) );
if( u_which >= _operation_evaluators.size() )
assert( "No registered evaluator for this operation" && false );
unique_ptr<op_evaluator>& eval = _operation_evaluators[ u_which ]; unique_ptr<op_evaluator>& eval = _operation_evaluators[ u_which ];
if( !eval ) FC_ASSERT( eval, "No registered evaluator for operation ${op}", ("op",op) );
assert( "No registered evaluator for this operation" && false );
auto op_id = push_applied_operation( op ); auto op_id = push_applied_operation( op );
auto result = eval->evaluate( eval_state, op, true ); auto result = eval->evaluate( eval_state, op, true );
set_applied_operation_result( op_id, result ); set_applied_operation_result( op_id, result );