Fix RandomX startup logic

Ensure that both RandomX caches initialize before stratum and p2p servers start.
This commit is contained in:
SChernykh
2021-08-25 18:31:42 +02:00
parent 276cc5f0fd
commit 0009eba307
3 changed files with 3 additions and 36 deletions
+2 -1
View File
@@ -393,7 +393,8 @@ void p2pool::download_block_headers(uint64_t current_height)
ChainMain block;
if (parse_block_header(data, size, block)) {
if (height == prev_seed_height) {
m_hasher->set_old_seed_async(block.id);
// Do it synchronously to make sure stratum and p2p don't start before it's finished
m_hasher->set_old_seed(block.id);
}
}
else {