Skip to content

Commit

Permalink
Fixes after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
LenyKholodov committed Mar 4, 2019
1 parent 42b49c9 commit 29a6687
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/p2p/net_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ namespace nodetool
private:
void handle_stake_transactions_update(const cryptonote::StakeTransactionProcessor::stake_transaction_array& stake_txs);
void handle_blockchain_based_list_update(uint64_t block_number, const cryptonote::StakeTransactionProcessor::supernode_tier_array& tiers);


private:
std::multimap<int, std::string> m_supernode_requests_timestamps;
std::set<std::string> m_supernode_requests_cache;
Expand Down
9 changes: 5 additions & 4 deletions src/p2p/net_node.inl
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ namespace nodetool
return 1;
}

if ((*it).second.last_announce_height == arg.height && (*it).second.last_announce_time + /*DIFFICULTY_TARGET_V2*/10 > time(nullptr))
if ((*it).second.last_announce_height == arg.height && (*it).second.last_announce_time + DIFFICULTY_TARGET_V2 > (unsigned)time(nullptr))
{
MDEBUG("existing announce, height: " << arg.height << ", last_announce_time: " << (*it).second.last_announce_time
<< ", current time: " << time(nullptr));
Expand All @@ -1092,10 +1092,10 @@ namespace nodetool
(*it).second.max_hop = arg.hop;
} while(0);

LOG_PRINT_L0("P2P Request: handle_supernode_announce: post to supernode: " << arg.supernode_public_id);
do {
boost::lock_guard<boost::recursive_mutex> guard(m_supernode_lock);
if (m_have_supernode) {
MDEBUG("P2P Request: handle_supernode_announce: post to supernode: " << arg.supernode_public_id);
post_request_to_supernode<cryptonote::COMMAND_RPC_SUPERNODE_ANNOUNCE>(supernode_endpoint, arg);
}
} while(0);
Expand Down Expand Up @@ -1123,8 +1123,9 @@ namespace nodetool

std::string arg_buff;
epee::serialization::store_t_to_binary(arg, arg_buff);
// MDEBUG("P2P Request: handle_supernode_announce: relaying to neighbours: " << random_connections.size());
MDEBUG("P2P Request: handle_supernode_announce: relaying to neighbours: " << all_connections.size());

MDEBUG("P2P Request: handle_supernode_announce: relaying to neighbours: " << random_connections.size());

relay_notify_to_list(command, arg_buff, random_connections);
LOG_PRINT_L0("P2P Request: handle_supernode_announce: end");
return 1;
Expand Down

0 comments on commit 29a6687

Please sign in to comment.