Skip to content

Commit 8223aba

Browse files
committed
Update ValidatorKeys.cpp
1 parent 41c12a6 commit 8223aba

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

src/xrpld/app/misc/detail/ValidatorKeys.cpp

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ ValidatorKeys::ValidatorKeys(Config const& config, beast::Journal j)
3131
if (!parsedKeyType)
3232
{
3333
configInvalid_ = true;
34-
JLOG(j.fatal())
35-
<< "Invalid key type specified in [" SECTION_VALIDATOR_KEY_TYPE
36-
"]: " << keyTypeStr;
34+
JLOG(j.fatal()) << "Invalid key type specified in "
35+
"[" SECTION_VALIDATOR_KEY_TYPE "]: "
36+
<< keyTypeStr;
3737
return;
3838
}
3939
keyType = *parsedKeyType;
@@ -43,16 +43,17 @@ ValidatorKeys::ValidatorKeys(Config const& config, beast::Journal j)
4343
if (auto token = loadValidatorToken(
4444
config.section(SECTION_VALIDATOR_TOKEN).lines()))
4545
{
46-
auto const pk =
47-
derivePublicKey(keyType, token->validationSecret);
46+
auto const pk = derivePublicKey(keyType, token->validationSecret);
4847
auto const m = deserializeManifest(base64_decode(token->manifest));
49-
5048
if (!m || pk != m->signingKey)
5149
{
5250
configInvalid_ = true;
5351
JLOG(j.fatal())
5452
<< "Invalid token specified in [" SECTION_VALIDATOR_TOKEN
55-
"]";
53+
"] "
54+
<< "PublicKey:" << toBase58(TokenType::NodePublic, pk)
55+
<< " KeyType: " << keyType
56+
<< " Manifest: " << (m ? to_string(*m) : "null");
5657
}
5758
else
5859
{
@@ -66,7 +67,8 @@ ValidatorKeys::ValidatorKeys(Config const& config, beast::Journal j)
6667
{
6768
configInvalid_ = true;
6869
JLOG(j.fatal())
69-
<< "Could not load token specified in [" SECTION_VALIDATOR_TOKEN "]";
70+
<< "Could not load token specified in [" SECTION_VALIDATOR_TOKEN
71+
"]";
7072
}
7173
}
7274
else if (config.exists(SECTION_VALIDATION_SEED))
@@ -91,9 +93,9 @@ ValidatorKeys::ValidatorKeys(Config const& config, beast::Journal j)
9193
if (!parsedKeyType)
9294
{
9395
configInvalid_ = true;
94-
JLOG(j.fatal())
95-
<< "Invalid key type specified in [" SECTION_VALIDATOR_KEY_TYPE
96-
"]: " << keyTypeStr;
96+
JLOG(j.fatal()) << "Invalid key type specified in "
97+
"[" SECTION_VALIDATOR_KEY_TYPE "]: "
98+
<< keyTypeStr;
9799
return;
98100
}
99101
keyType = *parsedKeyType;

0 commit comments

Comments
 (0)