eos icon indicating copy to clipboard operation
eos copied to clipboard

Two pieces of unused code

Open XHQ18 opened this issue 8 years ago • 1 comments

In the get_currency_balance function on line 1209 of the chain_plugin.cpp file

vector<asset> read_only::get_currency_balance( const read_only::get_currency_balance_params& p )const {

   const abi_def abi = eosio::chain_apis::get_abi( db, p.code );
   auto table_type = get_table_type( abi, "accounts" );

I didn't find the table_type variable used in this function. Are these two pieces of code redundant?

XHQ18 avatar Nov 08 '18 09:11 XHQ18

table_type isn't used in that scope, but calling get_table_type() checks whether specific table exists or not. It throws exception if tablename doesn't exist in ABI.

conr2d avatar Nov 08 '18 12:11 conr2d