From 1d0595e0a5a25e211491d0d027810eb848b5f9cd Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Tue, 2 Sep 2025 22:50:34 -0400 Subject: [PATCH] remove 'count' from get_table_by_scope response --- plugins/chain_plugin/chain_plugin.cpp | 2 +- .../chain_plugin/include/eosio/chain_plugin/chain_plugin.hpp | 3 +-- tests/get_table_tests.cpp | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/chain_plugin/chain_plugin.cpp b/plugins/chain_plugin/chain_plugin.cpp index 7e093a5e80..9e62ba0a7d 100644 --- a/plugins/chain_plugin/chain_plugin.cpp +++ b/plugins/chain_plugin/chain_plugin.cpp @@ -1651,7 +1651,7 @@ read_only::get_table_by_scope_result read_only::get_table_by_scope( const read_o for( unsigned int count = 0; count < limit && itr != end_itr; ++itr, ++count ) { if( p.table && itr->table != p.table ) continue; - result.rows.push_back( {itr->code, itr->scope, itr->table, itr->payer, itr->count} ); + result.rows.push_back( {itr->code, itr->scope, itr->table, itr->payer} ); if (fc::time_point::now() >= params_deadline) break; diff --git a/plugins/chain_plugin/include/eosio/chain_plugin/chain_plugin.hpp b/plugins/chain_plugin/include/eosio/chain_plugin/chain_plugin.hpp index 152f5ba49c..87a2c6770f 100644 --- a/plugins/chain_plugin/include/eosio/chain_plugin/chain_plugin.hpp +++ b/plugins/chain_plugin/include/eosio/chain_plugin/chain_plugin.hpp @@ -445,7 +445,6 @@ class read_only : public api_base { name scope; name table; name payer; - uint32_t count = 0; }; struct get_table_by_scope_result { vector rows; @@ -1037,7 +1036,7 @@ FC_REFLECT( eosio::chain_apis::read_only::get_table_rows_params, (json)(code)(sc FC_REFLECT( eosio::chain_apis::read_only::get_table_rows_result, (rows)(more)(next_key) ); FC_REFLECT( eosio::chain_apis::read_only::get_table_by_scope_params, (code)(table)(lower_bound)(upper_bound)(limit)(reverse)(time_limit_ms) ) -FC_REFLECT( eosio::chain_apis::read_only::get_table_by_scope_result_row, (code)(scope)(table)(payer)(count)); +FC_REFLECT( eosio::chain_apis::read_only::get_table_by_scope_result_row, (code)(scope)(table)(payer)); FC_REFLECT( eosio::chain_apis::read_only::get_table_by_scope_result, (rows)(more) ); FC_REFLECT( eosio::chain_apis::read_only::get_currency_balance_params, (code)(account)(symbol)); diff --git a/tests/get_table_tests.cpp b/tests/get_table_tests.cpp index a7820e1416..fa6c521c30 100644 --- a/tests/get_table_tests.cpp +++ b/tests/get_table_tests.cpp @@ -102,7 +102,6 @@ BOOST_FIXTURE_TEST_CASE( get_scope_test, validating_tester ) try { BOOST_REQUIRE_EQUAL(name("inita"_n), result.rows[0].scope); BOOST_REQUIRE_EQUAL(name("accounts"_n), result.rows[0].table); BOOST_REQUIRE_EQUAL(name("eosio"_n), result.rows[0].payer); - BOOST_REQUIRE_EQUAL(1u, result.rows[0].count); BOOST_REQUIRE_EQUAL(name("initb"_n), result.rows[1].scope); BOOST_REQUIRE_EQUAL(name("initc"_n), result.rows[2].scope);