Skip to content
Permalink
Browse files

Fix return type mismatches in cryptonote_protocol_handler.inl

  • Loading branch information...
miltonf committed Mar 16, 2019
1 parent 4257dc0 commit 5aa3b5087be6deadd1ed82fcf8b6843f4f8bbe61
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -796,7 +796,7 @@ namespace cryptonote
relay_transactions(arg, context);
}

return true;
return 1;
}
//------------------------------------------------------------------------------------------------------------------------
template<class t_core>
@@ -1065,7 +1065,7 @@ skip:
if (tvc.size() != block_entry.txs.size())
{
LOG_ERROR_CCONTEXT("Internal error: tvc.size() != block_entry.txs.size()");
return true;
return 1;
}
std::list<blobdata>::const_iterator it = block_entry.txs.begin();
for (size_t i = 0; i < tvc.size(); ++i, ++it)
@@ -1076,7 +1076,7 @@ skip:
LOG_ERROR_CCONTEXT("transaction verification failed on NOTIFY_RESPONSE_GET_OBJECTS, tx_id = "
<< epee::string_tools::pod_to_hex(get_blob_hash(*it)) << ", dropping connection");
drop_connection(context, false, true);
return true;
return 1;
}))
LOG_ERROR_CCONTEXT("span connection id not found");

@@ -1105,7 +1105,7 @@ skip:
if (!m_p2p->for_connection(span_connection_id, [&](cryptonote_connection_context& context, nodetool::peerid_type peer_id, uint32_t f)->bool{
LOG_PRINT_CCONTEXT_L1("Block verification failed, dropping connection");
drop_connection(context, true, true);
return true;
return 1;
}))
LOG_ERROR_CCONTEXT("span connection id not found");

@@ -1124,7 +1124,7 @@ skip:
if (!m_p2p->for_connection(span_connection_id, [&](cryptonote_connection_context& context, nodetool::peerid_type peer_id, uint32_t f)->bool{
LOG_PRINT_CCONTEXT_L1("Block received at sync phase was marked as orphaned, dropping connection");
drop_connection(context, true, true);
return true;
return 1;
}))
LOG_ERROR_CCONTEXT("span connection id not found");

@@ -1364,13 +1364,13 @@ skip:
MDEBUG(context << " we have the next span, and it is scheduled, resuming");
++context.m_callback_request_count;
m_p2p->request_callback(context);
return 1;
return true;
}

for (size_t n = 0; n < 50; ++n)
{
if (m_stopping)
return 1;
return true;
boost::this_thread::sleep_for(boost::chrono::milliseconds(100));
}
}
@@ -1694,7 +1694,7 @@ skip:
m_p2p->relay_notify_to_list(NOTIFY_NEW_FLUFFY_BLOCK::ID, fluffyBlob, fluffyConnections);
m_p2p->relay_notify_to_list(NOTIFY_NEW_BLOCK::ID, fullBlob, fullConnections);

return 1;
return true;
}
//------------------------------------------------------------------------------------------------------------------------
template<class t_core>

0 comments on commit 5aa3b50

Please sign in to comment.
You can’t perform that action at this time.