mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 07:25:51 +00:00
Include validator's master public key in validation stream:
The validation stream only reported the ephemeral signing key for validators which use manifests. This made tracking unnecessarily difficult for clients processing the data stream. With this change, the validator's long-term master public key is also included. This commit fixes #3005 * Provide proposing validator's master key in the validation stream subscription JSON responses. Implement code review changes. FIXES: #3005
This commit is contained in:
@@ -1721,16 +1721,23 @@ void NetworkOPsImp::pubValidation (STValidation::ref val)
|
||||
{
|
||||
Json::Value jvObj (Json::objectValue);
|
||||
|
||||
auto const signerPublic = val->getSignerPublic();
|
||||
|
||||
jvObj [jss::type] = "validationReceived";
|
||||
jvObj [jss::validation_public_key] = toBase58(
|
||||
TokenType::NodePublic,
|
||||
val->getSignerPublic());
|
||||
signerPublic);
|
||||
jvObj [jss::ledger_hash] = to_string (val->getLedgerHash ());
|
||||
jvObj [jss::signature] = strHex (val->getSignature ());
|
||||
jvObj [jss::full] = val->isFull();
|
||||
jvObj [jss::flags] = val->getFlags();
|
||||
jvObj [jss::signing_time] = *(*val)[~sfSigningTime];
|
||||
|
||||
auto const masterKey = app_.validatorManifests().getMasterKey(signerPublic);
|
||||
|
||||
if(masterKey != signerPublic)
|
||||
jvObj [jss::master_key] = toBase58(TokenType::NodePublic, masterKey);
|
||||
|
||||
if (auto const seq = (*val)[~sfLedgerSequence])
|
||||
jvObj [jss::ledger_index] = to_string (*seq);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user