aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/rpc_command_executor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/rpc_command_executor.cpp')
-rw-r--r--src/daemon/rpc_command_executor.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp
index 1ca728e39..80b14d534 100644
--- a/src/daemon/rpc_command_executor.cpp
+++ b/src/daemon/rpc_command_executor.cpp
@@ -1699,15 +1699,19 @@ bool t_rpc_command_executor::print_bans()
}
}
- for (auto i = res.bans.begin(); i != res.bans.end(); ++i)
+ if (!res.bans.empty())
{
- tools::msg_writer() << i->host << " banned for " << i->seconds << " seconds";
+ for (auto i = res.bans.begin(); i != res.bans.end(); ++i)
+ {
+ tools::msg_writer() << i->host << " banned for " << i->seconds << " seconds";
+ }
}
+ else
+ tools::msg_writer() << "No IPs are banned";
return true;
}
-
bool t_rpc_command_executor::ban(const std::string &address, time_t seconds)
{
cryptonote::COMMAND_RPC_SETBANS::request req;
@@ -1905,9 +1909,9 @@ bool t_rpc_command_executor::print_coinbase_tx_sum(uint64_t height, uint64_t cou
tools::msg_writer() << "Sum of coinbase transactions between block heights ["
<< height << ", " << (height + count) << ") is "
- << cryptonote::print_money(res.emission_amount + res.fee_amount) << " "
- << "consisting of " << cryptonote::print_money(res.emission_amount)
- << " in emissions, and " << cryptonote::print_money(res.fee_amount) << " in fees";
+ << cryptonote::print_money(boost::multiprecision::uint128_t(res.wide_emission_amount) + boost::multiprecision::uint128_t(res.wide_fee_amount)) << " "
+ << "consisting of " << cryptonote::print_money(boost::multiprecision::uint128_t(res.wide_emission_amount))
+ << " in emissions, and " << cryptonote::print_money(boost::multiprecision::uint128_t(res.wide_fee_amount)) << " in fees";
return true;
}
@@ -2427,7 +2431,7 @@ bool t_rpc_command_executor::set_bootstrap_daemon(
return true;
}
-bool t_rpc_command_executor::flush_cache(bool bad_txs)
+bool t_rpc_command_executor::flush_cache(bool bad_txs, bool bad_blocks)
{
cryptonote::COMMAND_RPC_FLUSH_CACHE::request req;
cryptonote::COMMAND_RPC_FLUSH_CACHE::response res;
@@ -2435,6 +2439,7 @@ bool t_rpc_command_executor::flush_cache(bool bad_txs)
epee::json_rpc::error error_resp;
req.bad_txs = bad_txs;
+ req.bad_blocks = bad_blocks;
if (m_is_rpc)
{