Merge pull request #3181

e3f0980a daemon: don't drop RPC with busy error when running offline (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2018-02-16 14:19:53 +01:00
commit bdf0339dda
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
4 changed files with 6 additions and 6 deletions

View file

@ -79,7 +79,7 @@ namespace cryptonote
typedef t_cryptonote_protocol_handler<t_core> cryptonote_protocol_handler; typedef t_cryptonote_protocol_handler<t_core> cryptonote_protocol_handler;
typedef CORE_SYNC_DATA payload_type; typedef CORE_SYNC_DATA payload_type;
t_cryptonote_protocol_handler(t_core& rcore, nodetool::i_p2p_endpoint<connection_context>* p_net_layout); t_cryptonote_protocol_handler(t_core& rcore, nodetool::i_p2p_endpoint<connection_context>* p_net_layout, bool offline = false);
BEGIN_INVOKE_MAP2(cryptonote_protocol_handler) BEGIN_INVOKE_MAP2(cryptonote_protocol_handler)
HANDLE_NOTIFY_T2(NOTIFY_NEW_BLOCK, &cryptonote_protocol_handler::handle_notify_new_block) HANDLE_NOTIFY_T2(NOTIFY_NEW_BLOCK, &cryptonote_protocol_handler::handle_notify_new_block)

View file

@ -61,10 +61,10 @@ namespace cryptonote
//----------------------------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------------------------
template<class t_core> template<class t_core>
t_cryptonote_protocol_handler<t_core>::t_cryptonote_protocol_handler(t_core& rcore, nodetool::i_p2p_endpoint<connection_context>* p_net_layout):m_core(rcore), t_cryptonote_protocol_handler<t_core>::t_cryptonote_protocol_handler(t_core& rcore, nodetool::i_p2p_endpoint<connection_context>* p_net_layout, bool offline):m_core(rcore),
m_p2p(p_net_layout), m_p2p(p_net_layout),
m_syncronized_connections_count(0), m_syncronized_connections_count(0),
m_synchronized(false), m_synchronized(offline),
m_stopping(false) m_stopping(false)
{ {

View file

@ -68,7 +68,7 @@ public:
boost::program_options::variables_map const & vm boost::program_options::variables_map const & vm
) )
: core{vm} : core{vm}
, protocol{vm, core} , protocol{vm, core, command_line::get_arg(vm, cryptonote::arg_offline)}
, p2p{vm, protocol} , p2p{vm, protocol}
{ {
// Handle circular dependencies // Handle circular dependencies

View file

@ -46,9 +46,9 @@ private:
public: public:
t_protocol( t_protocol(
boost::program_options::variables_map const & vm boost::program_options::variables_map const & vm
, t_core & core , t_core & core, bool offline = false
) )
: m_protocol{core.get(), nullptr} : m_protocol{core.get(), nullptr, offline}
{ {
MGINFO("Initializing cryptonote protocol..."); MGINFO("Initializing cryptonote protocol...");
if (!m_protocol.init(vm)) if (!m_protocol.init(vm))