mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add public_key to the "vl" method response:
The "/vl" HTTP endpoint can be used to request a particular UNL from a rippled instance. This commit, if merged, includes the public key of the requested list in the response. This commit fixes #3392
This commit is contained in:
committed by
Nik Bougalis
parent
271e79095b
commit
b1d47c65d4
@@ -26,6 +26,7 @@
|
||||
#include <ripple/protocol/SecretKey.h>
|
||||
#include <ripple/protocol/Sign.h>
|
||||
#include <ripple/protocol/digest.h>
|
||||
#include <ripple/protocol/jss.h>
|
||||
#include <test/jtx.h>
|
||||
|
||||
namespace ripple {
|
||||
@@ -570,6 +571,21 @@ private:
|
||||
BEAST_EXPECT(trustedKeys->listed(val.signingPublic));
|
||||
}
|
||||
|
||||
const auto hexPublic =
|
||||
strHex(publisherPublic.begin(), publisherPublic.end());
|
||||
|
||||
const auto available = trustedKeys->getAvailable(hexPublic);
|
||||
|
||||
if (BEAST_EXPECT(available))
|
||||
{
|
||||
auto const& a = *available;
|
||||
BEAST_EXPECT(a[jss::public_key] == hexPublic);
|
||||
BEAST_EXPECT(a[jss::blob] == blob2);
|
||||
BEAST_EXPECT(a[jss::manifest] == manifest1);
|
||||
BEAST_EXPECT(a[jss::version] == version);
|
||||
BEAST_EXPECT(a[jss::signature] == sig2);
|
||||
}
|
||||
|
||||
// do not re-apply lists with past or current sequence numbers
|
||||
BEAST_EXPECT(
|
||||
ListDisposition::stale ==
|
||||
|
||||
Reference in New Issue
Block a user