Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/walletdb.cpp
Show First 20 Lines • Show All 288 Lines • ▼ Show 20 Lines | try { | ||||
CKey key; | CKey key; | ||||
CPrivKey pkey; | CPrivKey pkey; | ||||
uint256 hash; | uint256 hash; | ||||
if (strType == DBKeys::KEY) { | if (strType == DBKeys::KEY) { | ||||
wss.nKeys++; | wss.nKeys++; | ||||
ssValue >> pkey; | ssValue >> pkey; | ||||
} else { | } else { | ||||
CWalletKey wkey; | OldKey wkey; | ||||
ssValue >> wkey; | ssValue >> wkey; | ||||
pkey = wkey.vchPrivKey; | pkey = wkey.vchPrivKey; | ||||
} | } | ||||
// Old wallets store keys as DBKeys::KEY [pubkey] => [privkey] ... | // Old wallets store keys as DBKeys::KEY [pubkey] => [privkey] ... | ||||
// which was slow for wallets with lots of keys, because the public | // 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 | // key is re-derived from the private key using EC operations as a | ||||
// checksum. Newer wallets store keys as DBKeys::KEY [pubkey] => | // checksum. Newer wallets store keys as DBKeys::KEY [pubkey] => | ||||
▲ Show 20 Lines • Show All 517 Lines • Show Last 20 Lines |