De-duplicate tx hashes and pub keys to save memory (off by default) (#382)
P2Pool-main: 8.2 MB saved P2Pool-mini: 66 MB saved P2Pool-nano: 25.2 MB saved The feature is available only when building from source and is intended for use on low-memory systems (for example, a VPS server with < 1 GB RAM). It only makes sense to use with `--no-cache --no-randomx` in the command line because cache and RandomX hasher take much more memory.
This commit is contained in:
@@ -26,7 +26,7 @@ namespace p2pool {
|
||||
TEST(crypto, derivation)
|
||||
{
|
||||
init_crypto_cache();
|
||||
|
||||
{
|
||||
hash pub, sec;
|
||||
generate_keys(pub, sec);
|
||||
ASSERT_TRUE(check_keys(pub, sec));
|
||||
@@ -105,9 +105,13 @@ TEST(crypto, derivation)
|
||||
}
|
||||
} while (!f.eof());
|
||||
}
|
||||
|
||||
}
|
||||
clear_crypto_cache(0);
|
||||
destroy_crypto_cache();
|
||||
|
||||
#ifdef WITH_INDEXED_HASHES
|
||||
indexed_hash::cleanup_storage();
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user