-
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
Added public_key to ValidatorList::getAvailable response #3488
Changes from 7 commits
91704a4
1fb4ef7
52446e3
1035d56
9c7c0a5
febeeeb
bc43f0d
e0fdf03
8a63ff3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -570,6 +570,25 @@ class ValidatorList_test : public beast::unit_test::suite | |
BEAST_EXPECT(trustedKeys->listed(val.signingPublic)); | ||
} | ||
|
||
const auto hexPublic = | ||
strHex(publisherPublic.begin(), publisherPublic.end()); | ||
|
||
const auto available = trustedKeys->getAvailable(hexPublic); | ||
|
||
BEAST_EXPECT(available); | ||
if (available) | ||
{ | ||
BEAST_EXPECT( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're missing an include for the non-unity builds, so |
||
available->get(jss::public_key, Json::nullValue) == hexPublic); | ||
BEAST_EXPECT(available->get(jss::blob, Json::nullValue) == blob2); | ||
BEAST_EXPECT( | ||
available->get(jss::manifest, Json::nullValue) == manifest1); | ||
BEAST_EXPECT( | ||
available->get(jss::version, Json::nullValue) == version); | ||
BEAST_EXPECT( | ||
available->get(jss::signature, Json::nullValue) == sig2); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This is more personal preference, so whether to change it is up to you. |
||
} | ||
|
||
// do not re-apply lists with past or current sequence numbers | ||
BEAST_EXPECT( | ||
ListDisposition::stale == | ||
|
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.
BEAST_EXPECT
returns thebool
value of the test, so you can write this asif (BEAST_EXPECT(available))