From 2bc38983f702ae8abd6c2998f41ee4bb2e0402f6 Mon Sep 17 00:00:00 2001 From: Nik Bougalis Date: Thu, 18 Jun 2020 19:01:44 -0700 Subject: [PATCH] [FOLD] Remove per-256 response in 'feature' RPC --- src/ripple/app/misc/impl/AmendmentTable.cpp | 3 --- src/test/rpc/Feature_test.cpp | 11 ++++------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/ripple/app/misc/impl/AmendmentTable.cpp b/src/ripple/app/misc/impl/AmendmentTable.cpp index 74ef2549c18..9738f69b052 100644 --- a/src/ripple/app/misc/impl/AmendmentTable.cpp +++ b/src/ripple/app/misc/impl/AmendmentTable.cpp @@ -641,10 +641,7 @@ AmendmentTableImpl::injectJson( v[jss::validations] = votesTotal; if (votesNeeded) - { - v[jss::vote] = votesFor * 256 / votesNeeded; v[jss::threshold] = votesNeeded; - } } } diff --git a/src/test/rpc/Feature_test.cpp b/src/test/rpc/Feature_test.cpp index 731e3560dfc..87a666fbb1e 100644 --- a/src/test/rpc/Feature_test.cpp +++ b/src/test/rpc/Feature_test.cpp @@ -177,9 +177,6 @@ class Feature_test : public beast::unit_test::suite BEAST_EXPECTS( !feature.isMember(jss::validations), feature[jss::name].asString() + " validations"); - BEAST_EXPECTS( - !feature.isMember(jss::vote), - feature[jss::name].asString() + " vote"); } auto majorities = getMajorityAmendments(*env.closed()); @@ -218,10 +215,10 @@ class Feature_test : public beast::unit_test::suite BEAST_EXPECTS( feature.isMember(jss::validations), feature[jss::name].asString() + " validations"); - BEAST_EXPECTS( - feature.isMember(jss::vote), - feature[jss::name].asString() + " vote"); - BEAST_EXPECT(feature[jss::vote] == 256); + + BEAST_EXPECT(feature[jss::count] == 1); + BEAST_EXPECT(feature[jss::threshold] == 1); + BEAST_EXPECT(feature[jss::validations] == 1); BEAST_EXPECT(feature[jss::majority] == 2740); } }