-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix checking ammID field of account #5188
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5188 +/- ##
=========================================
- Coverage 77.9% 77.9% -0.0%
=========================================
Files 782 782
Lines 66621 66622 +1
Branches 8161 8158 -3
=========================================
- Hits 51902 51874 -28
- Misses 14719 14748 +29
|
064bd15
to
dddf2b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
Unrelated to this change, but on line 162, an non existent AMM object is returned with rpcACT_NOT_FOUND error. Doesn't sound right, should we fix it?
|
using namespace jtx; | ||
testcase("Invalid amm field"); | ||
|
||
testAMM([&](AMM& amm, Env&) { | ||
auto const resp = amm.ammRpcInfo( | ||
std::nullopt, | ||
jss::validated.c_str(), | ||
std::nullopt, | ||
std::nullopt, | ||
gw); | ||
BEAST_EXPECT( | ||
resp.isMember("error") && resp["error"] == "actNotFound"); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the test could be moved into testErrors()
IMO
It's half correct since AMM might be fetched by amm account. But correct, |
although i believe we may need a new API version for this change |
Ready to be merged. |
High Level Overview of Change
This fix add check for sfAMMID field in amm_info handler.
Context of Change
Without this check debug version of rippled crash on assert in ledger::read()
Bug was found during automation testing.
Type of Change
API Impact