P2PServer: delete old cached blocks after initial sync

Saves ~20 MB of memory
This commit is contained in:
SChernykh
2021-10-01 15:21:32 +02:00
parent 00281fb006
commit 2a3cd13b19
7 changed files with 48 additions and 9 deletions

View File

@@ -25,6 +25,8 @@ namespace p2pool {
TEST(crypto, derivation)
{
init_crypto_cache();
// Run the tests twice to check how crypto cache works
for (int i = 0; i < 2; ++i) {
std::ifstream f("crypto_tests.txt");
@@ -61,6 +63,8 @@ TEST(crypto, derivation)
}
} while (!f.eof());
}
destroy_crypto_cache();
}
}