aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-08-26 23:37:30 +0200
committerRiccardo Spagni <ric@spagni.net>2017-08-26 23:37:30 +0200
commit30eae5f15076de9346e940f309545fc0f9d6bfbb (patch)
tree2b480ed267311d1e439d2b2b72be64c47fe2e3c0 /src
parentMerge pull request #2355 (diff)
parentdaemon: fix backlog estimating at max block size (diff)
downloadmonero-30eae5f15076de9346e940f309545fc0f9d6bfbb.tar.xz
Merge pull request #2353
19393115 daemon: fix backlog estimating at max block size (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r--src/daemon/rpc_command_executor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp
index fde1749d2..e35756a22 100644
--- a/src/daemon/rpc_command_executor.cpp
+++ b/src/daemon/rpc_command_executor.cpp
@@ -963,13 +963,14 @@ bool t_rpc_command_executor::print_transaction_pool_stats() {
size_t avg_bytes = n_transactions ? res.pool_stats.bytes_total / n_transactions : 0;
std::string backlog_message;
- if (res.pool_stats.bytes_total <= ires.block_size_limit)
+ const uint64_t full_reward_zone = ires.block_size_limit / 2;
+ if (res.pool_stats.bytes_total <= full_reward_zone)
{
backlog_message = "no backlog";
}
else
{
- uint64_t backlog = (res.pool_stats.bytes_total + ires.block_size_limit - 1) / ires.block_size_limit;
+ uint64_t backlog = (res.pool_stats.bytes_total + full_reward_zone - 1) / full_reward_zone;
backlog_message = (boost::format("estimated %u block (%u minutes) backlog") % backlog % (backlog * DIFFICULTY_TARGET_V2 / 60)).str();
}