mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-13 10:21:34 +02:00
wallet: bugfix, invalid crypted key "checksum_valid" set
At wallet load time, we set the crypted key "checksum_valid" variable always to false. Which, on every wallet decryption call, forces the process to re-write the entire ckeys to db when it's not needed.
This commit is contained in:
parent
256120d2da
commit
cc5a5e8121
@ -482,7 +482,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
|
|||||||
if (!ssValue.eof()) {
|
if (!ssValue.eof()) {
|
||||||
uint256 checksum;
|
uint256 checksum;
|
||||||
ssValue >> checksum;
|
ssValue >> checksum;
|
||||||
if ((checksum_valid = Hash(vchPrivKey) != checksum)) {
|
if (!(checksum_valid = Hash(vchPrivKey) == checksum)) {
|
||||||
strErr = "Error reading wallet database: Encrypted key corrupt";
|
strErr = "Error reading wallet database: Encrypted key corrupt";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user