Add caching of incremental witnesses for spendable notes

This commit is contained in:
Jack Grigg
2016-08-24 15:52:27 +12:00
parent 8db7e25c3f
commit be74c80deb
6 changed files with 367 additions and 1 deletions

View File

@@ -162,6 +162,12 @@ bool CWalletDB::WriteDefaultKey(const CPubKey& vchPubKey)
return Write(std::string("defaultkey"), vchPubKey);
}
bool CWalletDB::WriteAnchorCache(const std::list<uint256>& vAnchorCache)
{
nWalletDBUpdated++;
return Write(std::string("anchorcache"), vAnchorCache);
}
bool CWalletDB::ReadPool(int64_t nPool, CKeyPool& keypool)
{
return Read(std::make_pair(std::string("pool"), nPool), keypool);
@@ -631,6 +637,10 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
return false;
}
}
else if (strType == "anchorcache")
{
ssValue >> pwallet->vAnchorCache;
}
} catch (...)
{
return false;