MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / RemoveKey

Method RemoveKey

src/wallet/wallet.cpp:581–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

579}
580
581bool CWallet::RemoveKey(const CKey &key) {
582 CKeyID keyId = key.GetPubKey().GetKeyId();
583
584 if (!IsEncrypted()) { //unencrypted or unlocked
585 CWalletDB(strWalletFile).EraseKeyStoreValue(keyId);
586 mapKeys.erase(keyId);
587 } else {
588 return ERRORMSG("wallet is being locked hence no key removal!");
589 }
590
591 return true;
592}
593
594bool CWallet::IsReadyForColdMining(const CAccountDBCache &accountView) const {
595 CRegID regId;

Callers 4

CommonTxGeneratorFunction · 0.80
ContractTxGeneratorFunction · 0.80
WasmTxGeneratorFunction · 0.80
dropprivkeyFunction · 0.80

Calls 5

CWalletDBClass · 0.85
EraseKeyStoreValueMethod · 0.80
GetKeyIdMethod · 0.45
GetPubKeyMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected