mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
[tools] Add wallet inspection and modification tool
This commit adds wallet-tool, a tool for creating and interacting with wallet files. Original implementation was by Jonas Schnelli <dev@jonasschnelli.ch> with modifications by John Newbery <john@johnnewbery.com> MSVC files were provided by Chun Kuan Lee <ken2812221@gmail.com>: build: Add MSVC project files for bitcoin-wallet-tool
This commit is contained in:
committed by
John Newbery
parent
a5daf70ffb
commit
49d2374acf
@@ -175,7 +175,7 @@ bool CCryptoKeyStore::Lock()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn)
|
||||
bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn, bool accept_no_keys)
|
||||
{
|
||||
{
|
||||
LOCK(cs_KeyStore);
|
||||
@@ -204,7 +204,7 @@ bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn)
|
||||
LogPrintf("The wallet is probably corrupted: Some keys decrypt but not all.\n");
|
||||
throw std::runtime_error("Error unlocking wallet: some keys decrypt but not all. Your wallet file may be corrupt.");
|
||||
}
|
||||
if (keyFail || !keyPass)
|
||||
if (keyFail || (!keyPass && !accept_no_keys))
|
||||
return false;
|
||||
vMasterKey = vMasterKeyIn;
|
||||
fDecryptionThoroughlyChecked = true;
|
||||
|
||||
Reference in New Issue
Block a user