Skip to content

Commit

Permalink
320 MB flush
Browse files Browse the repository at this point in the history
  • Loading branch information
ohcee authored May 31, 2024
1 parent 6a1c1ba commit fbc1b15
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/txdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ bool CCoinsViewDB::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) {
size_t changed = 0;
//size_t batch_size = (size_t)gArgs.GetArg("-dbbatchsize", nDefaultDbBatchSize);

size_t batch_size = 536870912; // 512 MB
size_t batch_size = 335544320; // 320 MB
int crash_simulate = gArgs.GetArg("-dbcrashratio", 0);
assert(!hashBlock.IsNull());

Expand Down Expand Up @@ -536,7 +536,7 @@ CZerocoinDB::CZerocoinDB(size_t nCacheSize, bool fMemory, bool fWipe) : CDBWrapp
//TODO: add prefixes for zerocoindb to the top of the file insteadof using chars when doing database operations
bool CZerocoinDB::WriteCoinMintBatch(const std::map<libzerocoin::PublicCoin, uint256>& mintInfo)
{
const size_t FLUSH_SIZE = 536870912; // 512 MB
const size_t FLUSH_SIZE = 335544320; // 320 MB
auto it = mintInfo.begin(); // Iterator for traversing the map
size_t count = 0; // Counter to keep track of the number of items processed

Expand Down Expand Up @@ -590,7 +590,7 @@ bool CZerocoinDB::EraseCoinMint(const CBigNum& bnPubcoin)

bool CZerocoinDB::WriteCoinSpendBatch(const std::map<libzerocoin::CoinSpend, uint256>& spendInfo)
{
const size_t FLUSH_SIZE = 536870912; // 512 MB
const size_t FLUSH_SIZE = 335544320; // 320 MB
auto it = spendInfo.begin(); // Iterator for traversing the map
size_t count = 0; // Counter to keep track of the number of items processed

Expand Down Expand Up @@ -653,7 +653,7 @@ bool CZerocoinDB::EraseCoinSpend(const CBigNum& bnSerial)

bool CZerocoinDB::WritePubcoinSpendBatch(std::map<uint256, uint256>& mapPubcoinSpends, const uint256& hashBlock)
{
const size_t FLUSH_SIZE = 536870912; // 512 MB
const size_t FLUSH_SIZE = 335544320; // 320 MB
auto it = mapPubcoinSpends.begin(); // Iterator for traversing the map
size_t count = 0; // Counter to keep track of the number of items processed

Expand Down

0 comments on commit fbc1b15

Please sign in to comment.