mirror of
https://github.com/SChernykh/p2pool.git
synced 2025-02-02 03:06:27 +00:00
Reduced transaction time-to-include delay
Based on data from https://rucknium.me/posts/monero-pool-transaction-delay/ > 95 percent all transactions arrived at all five Monero nodes within a five-second interval.
This commit is contained in:
parent
85d177d394
commit
595196b5ec
2 changed files with 5 additions and 5 deletions
|
@ -325,7 +325,7 @@ void BlockTemplate::update(const MinerData& data, const Mempool& mempool, Wallet
|
|||
parallel_run(uv_default_loop_checked(), Precalc(m_shares, m_poolBlockTemplate->m_txkeySec));
|
||||
}
|
||||
|
||||
// Only choose transactions that were received 10 or more seconds ago, or high fee (>= 0.006 XMR) transactions
|
||||
// Only choose transactions that were received 5 or more seconds ago, or high fee (>= 0.006 XMR) transactions
|
||||
size_t total_mempool_transactions;
|
||||
{
|
||||
m_mempoolTxs.clear();
|
||||
|
@ -337,7 +337,7 @@ void BlockTemplate::update(const MinerData& data, const Mempool& mempool, Wallet
|
|||
const uint64_t cur_time = seconds_since_epoch();
|
||||
|
||||
for (auto& it : mempool.m_transactions) {
|
||||
if ((cur_time >= it.second.time_received + 10) || (it.second.fee >= HIGH_FEE_VALUE)) {
|
||||
if ((cur_time > it.second.time_received + 5) || (it.second.fee >= HIGH_FEE_VALUE)) {
|
||||
m_mempoolTxs.emplace_back(it.second);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1162,9 +1162,9 @@ void P2PServer::check_block_template()
|
|||
return;
|
||||
}
|
||||
|
||||
// Force update block template every 30 seconds after the initial sync is done
|
||||
if (seconds_since_epoch() >= m_pool->block_template().last_updated() + 30) {
|
||||
LOGINFO(4, "block template is 30 seconds old, updating it");
|
||||
// Force update block template every 20 seconds after the initial sync is done
|
||||
if (seconds_since_epoch() >= m_pool->block_template().last_updated() + 20) {
|
||||
LOGINFO(4, "block template is 20 seconds old, updating it");
|
||||
m_pool->update_block_template_async();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue