mirror of
https://github.com/monero-project/monero.git
synced 2025-08-17 03:30:26 -04:00
rpc: add a busy_syncing field to get_info
true if and pretty much only if new blocks are being added
This commit is contained in:
parent
e5decd0cde
commit
5a1ac9c0ef
4 changed files with 13 additions and 1 deletions
|
@ -2771,6 +2771,13 @@ skip:
|
|||
}
|
||||
//------------------------------------------------------------------------------------------------------------------------
|
||||
template<class t_core>
|
||||
bool t_cryptonote_protocol_handler<t_core>::is_busy_syncing()
|
||||
{
|
||||
const boost::unique_lock<boost::mutex> sync{m_sync_lock, boost::try_to_lock};
|
||||
return !sync.owns_lock();
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------------------------
|
||||
template<class t_core>
|
||||
void t_cryptonote_protocol_handler<t_core>::drop_connection_with_score(cryptonote_connection_context &context, unsigned score, bool flush_all_spans)
|
||||
{
|
||||
LOG_DEBUG_CC(context, "dropping connection id " << context.m_connection_id << " (pruning seed " <<
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue