Browse Source

Fix HDSeed comment

pull/4/head
Eirik Ogilvie-Wigley 6 years ago
parent
commit
3f824a908b
  1. 2
      qa/rpc-tests/wallet_import_export.py
  2. 3
      src/wallet/rpcdump.cpp

2
qa/rpc-tests/wallet_import_export.py

@ -61,6 +61,8 @@ def parse_wallet_file(dump_path):
# We expect information about the HDSeed and fingerpring in the header
assert_true("HDSeed" in file_lines[4], "Expected HDSeed")
assert_true("fingerprint" in file_lines[4], "Expected fingerprint")
seed_comment_line = file_lines[4][2:].split() # ["HDSeed=...", "fingerprint=..."]
assert_true(seed_comment_line[0].split("=")[1] != seed_comment_line[1].split("=")[1], "The seed should not equal the fingerprint")
(t_keys, i) = parse_wallet_file_lines(file_lines, 0)
(sprout_keys, i) = parse_wallet_file_lines(file_lines, i)
(sapling_keys, i) = parse_wallet_file_lines(file_lines, i)

3
src/wallet/rpcdump.cpp

@ -508,7 +508,8 @@ UniValue dumpwallet_impl(const UniValue& params, bool fHelp, bool fDumpZKeys)
{
HDSeed hdSeed;
pwalletMain->GetHDSeed(hdSeed);
file << strprintf("# HDSeed=%s fingerprint=%s", pwalletMain->GetHDChain().seedFp.GetHex(), hdSeed.Fingerprint().GetHex());
auto rawSeed = hdSeed.RawSeed();
file << strprintf("# HDSeed=%s fingerprint=%s", HexStr(rawSeed.begin(), rawSeed.end()), hdSeed.Fingerprint().GetHex());
file << "\n";
}
file << "\n";

Loading…
Cancel
Save