mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03: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
1 changed files with 1 additions and 1 deletions
|
@ -482,7 +482,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
|
|||
if (!ssValue.eof()) {
|
||||
uint256 checksum;
|
||||
ssValue >> checksum;
|
||||
if ((checksum_valid = Hash(vchPrivKey) != checksum)) {
|
||||
if (!(checksum_valid = Hash(vchPrivKey) == checksum)) {
|
||||
strErr = "Error reading wallet database: Encrypted key corrupt";
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue