Skip to content

Commit

Permalink
[FOLD] Remove per-256 response in 'feature' RPC
Browse files Browse the repository at this point in the history
  • Loading branch information
nbougalis committed Jun 19, 2020
1 parent 9f6aefc commit 2bc3898
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
3 changes: 0 additions & 3 deletions src/ripple/app/misc/impl/AmendmentTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,10 +641,7 @@ AmendmentTableImpl::injectJson(
v[jss::validations] = votesTotal;

if (votesNeeded)
{
v[jss::vote] = votesFor * 256 / votesNeeded;
v[jss::threshold] = votesNeeded;
}
}
}

Expand Down
11 changes: 4 additions & 7 deletions src/test/rpc/Feature_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 2bc3898

Please sign in to comment.