eos
eos copied to clipboard
Two pieces of unused code
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?
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.