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

@@ -16,6 +16,7 @@
*/
#include "common.h"
#include "crypto.h"
#include "p2pool.h"
#include "stratum_server.h"
#include "p2p_server.h"
@@ -68,10 +69,14 @@ int main(int argc, char* argv[])
int result;
memory_tracking_start();
p2pool::init_crypto_cache();
{
p2pool::p2pool pool(argc, argv);
result = pool.run();
}
p2pool::destroy_crypto_cache();
memory_tracking_stop();
return result;