From e4f7483ec3c6016b065cfc58a5ec346cbce7e1cc Mon Sep 17 00:00:00 2001 From: theoreticalbts Date: Thu, 11 Feb 2016 03:23:15 -0500 Subject: [PATCH] transfer_evaluator.cpp: Remove unused variable and redundant check #566 This check was the pre-419 check of whether the fee asset is authorized, which was (due to a typo) buggily checking the sent asset rather then the fee asset. --- libraries/chain/transfer_evaluator.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/libraries/chain/transfer_evaluator.cpp b/libraries/chain/transfer_evaluator.cpp index 4ec9e3e9..accc6ca3 100644 --- a/libraries/chain/transfer_evaluator.cpp +++ b/libraries/chain/transfer_evaluator.cpp @@ -36,7 +36,6 @@ void_result transfer_evaluator::do_evaluate( const transfer_operation& op ) const account_object& from_account = op.from(d); const account_object& to_account = op.to(d); const asset_object& asset_type = op.amount.asset_id(d); - const asset_object& fee_asset_type = op.fee.asset_id(d); try { @@ -55,12 +54,6 @@ void_result transfer_evaluator::do_evaluate( const transfer_operation& op ) ("asset",op.amount.asset_id) ); - if( d.head_block_time() <= HARDFORK_419_TIME ) - { - FC_ASSERT( is_authorized_asset( d, from_account, asset_type ) ); - } - // the above becomes no-op after hardfork because this check will then be performed in evaluator - if( asset_type.is_transfer_restricted() ) { GRAPHENE_ASSERT( @@ -105,7 +98,6 @@ void_result override_transfer_evaluator::do_evaluate( const override_transfer_op const account_object& from_account = op.from(d); const account_object& to_account = op.to(d); - const asset_object& fee_asset_type = op.fee.asset_id(d); FC_ASSERT( is_authorized_asset( d, to_account, asset_type ) ); FC_ASSERT( is_authorized_asset( d, from_account, asset_type ) );