mirror of https://github.com/SChernykh/p2pool
Clear crypto cache more often
parent
6a66615f37
commit
32ea0f2cf6
|
@ -301,6 +301,9 @@ void p2pool::handle_miner_data(MinerData& data)
|
||||||
"\n---------------------------------------------------------------------------------------------------------------"
|
"\n---------------------------------------------------------------------------------------------------------------"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Tx secret keys from all miners change every block, so cache can be cleared here
|
||||||
|
clear_crypto_cache();
|
||||||
|
|
||||||
if (!is_main_thread()) {
|
if (!is_main_thread()) {
|
||||||
update_block_template_async();
|
update_block_template_async();
|
||||||
}
|
}
|
||||||
|
@ -1322,8 +1325,6 @@ void p2pool::cleanup_mainchain_data(uint64_t height)
|
||||||
|
|
||||||
void p2pool::api_update_block_found(const ChainMain* data)
|
void p2pool::api_update_block_found(const ChainMain* data)
|
||||||
{
|
{
|
||||||
clear_crypto_cache();
|
|
||||||
|
|
||||||
if (!m_api) {
|
if (!m_api) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "stratum_server.h"
|
#include "stratum_server.h"
|
||||||
#include "params.h"
|
#include "params.h"
|
||||||
#include "json_parsers.h"
|
#include "json_parsers.h"
|
||||||
|
#include "crypto.h"
|
||||||
#include <rapidjson/document.h>
|
#include <rapidjson/document.h>
|
||||||
#include <rapidjson/istreamwrapper.h>
|
#include <rapidjson/istreamwrapper.h>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
@ -1621,6 +1622,8 @@ void SideChain::update_chain_tip(const PoolBlock* block)
|
||||||
if (s) {
|
if (s) {
|
||||||
s->reset_share_counters();
|
s->reset_share_counters();
|
||||||
}
|
}
|
||||||
|
// Also clear cache because it has data from all old blocks now
|
||||||
|
clear_crypto_cache();
|
||||||
LOGINFO(0, log::LightCyan() << "SYNCHRONIZED");
|
LOGINFO(0, log::LightCyan() << "SYNCHRONIZED");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue