mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03:00
comment explaining new wallet format for key/wkey entries
This commit is contained in:
parent
a42eef6f10
commit
bc68788317
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue