| 298 | } |
| 299 | |
| 300 | bool CWalletDB::WriteCryptedKey(const CPubKey& pubkey, const std::vector<unsigned char>& vchCryptedSecret) { |
| 301 | nWalletDBUpdated++; |
| 302 | if (!Write(std::make_pair(std::string("ckey"), pubkey), vchCryptedSecret, true)) |
| 303 | return false; |
| 304 | CKeyCombi keyCombi; |
| 305 | CKeyID keyId = pubkey.GetKeyId(); |
| 306 | int32_t nVersion(0); |
| 307 | Read(string("minversion"), nVersion); |
| 308 | if (Read(make_pair(string("keystore"), keyId), keyCombi, nVersion)) { |
| 309 | keyCombi.PurgeMainKey(); |
| 310 | if (!Write(make_pair(string("keystore"), keyId), keyCombi, true)) { |
| 311 | return false; |
| 312 | } |
| 313 | } |
| 314 | return true; |
| 315 | } |
| 316 | |
| 317 | bool CWalletDB::WriteUnconfirmedTx(const uint256& hash, const std::shared_ptr<CBaseTx>& tx) { |
| 318 | nWalletDBUpdated++; |
no test coverage detected