diff options
author | phantomcircuit <phantomcircuit@debian> | 2013-10-12 23:44:28 -0700 |
---|---|---|
committer | phantomcircuit <phantomcircuit@debian> | 2013-10-12 23:44:28 -0700 |
commit | bc68788317a4ece16f0cfb0cb7eb1e0e220cbc6f (patch) | |
tree | 03c5f214af41d66e01c426a5ece04bd0183317cf /src | |
parent | a42eef6f10e1da1c76e1c9ba49a2ff2459c62fea (diff) |
comment explaining new wallet format for key/wkey entries
Diffstat (limited to 'src')
-rw-r--r-- | src/walletdb.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/walletdb.cpp b/src/walletdb.cpp index f7edd08458..d31db5e425 100644 --- a/src/walletdb.cpp +++ b/src/walletdb.cpp @@ -317,6 +317,12 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, ssValue >> wkey; pkey = wkey.vchPrivKey; } + + // Old wallets store keys as "key" [pubkey] => [privkey] + // ... which was slow for wallets with lots of keys, because the public key is re-derived from the private key + // using EC operations as a checksum. + // Newer wallets store keys as "key"[pubkey] => [privkey][hash(pubkey,privkey)], which is much faster while + // remaining backwards-compatible. try { ssValue >> hash; |