Skip to content

Commit

Permalink
flush size 10 GB
Browse files Browse the repository at this point in the history
  • Loading branch information
ohcee authored Jul 7, 2024
1 parent fd65873 commit 533a70e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/txdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ CZerocoinDB::CZerocoinDB(size_t nCacheSize, bool fMemory, bool fWipe) : CDBWrapp
bool CZerocoinDB::WriteCoinMintBatch(const std::map<libzerocoin::PublicCoin, uint256>& mintInfo) {
LogPrint(BCLog::ZEROCOINDB, "Starting WriteCoinMintBatch with %u mints\n", (unsigned int)mintInfo.size());

const size_t FLUSH_SIZE = 7516192768; // Set flush size to 7 GB
const size_t FLUSH_SIZE = 10737418240; // Set flush size to 10 GB
std::vector<std::pair<std::pair<char, uint256>, uint256>> cache;
size_t currentCacheSize = 0; // Track current cache size in bytes

Expand Down Expand Up @@ -606,7 +606,7 @@ bool CZerocoinDB::EraseCoinMint(const CBigNum& bnPubcoin)
bool CZerocoinDB::WriteCoinSpendBatch(const std::map<libzerocoin::CoinSpend, uint256>& spendInfo) {
LogPrint(BCLog::ZEROCOINDB, "Starting WriteCoinSpendBatch with %u spends\n", (unsigned int)spendInfo.size());

const size_t FLUSH_SIZE = 7516192768; // Set flush size to 7 GB
const size_t FLUSH_SIZE = 10737418240; // Set flush size to 10 GB
std::vector<std::pair<std::pair<char, uint256>, uint256>> cache;
size_t currentCacheSize = 0;

Expand Down Expand Up @@ -685,7 +685,7 @@ bool CZerocoinDB::EraseCoinSpend(const CBigNum& bnSerial)
bool CZerocoinDB::WritePubcoinSpendBatch(std::map<uint256, uint256>& mapPubcoinSpends, const uint256& hashBlock) {
LogPrint(BCLog::ZEROCOINDB, "Starting WritePubcoinSpendBatch with %u spends\n", (unsigned int)mapPubcoinSpends.size());

const size_t FLUSH_SIZE = 7516192768; // Set flush size to 7 GB
const size_t FLUSH_SIZE = 10737418240; // Set flush size to 10 GB
std::vector<std::pair<std::pair<char, uint256>, std::pair<uint256, uint256>>> cache;
size_t currentCacheSize = 0;

Expand Down

0 comments on commit 533a70e

Please sign in to comment.