mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 09:26:18 -05:00
fixed stupid serialisation error causing routing matrix not to be loaded properly
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7357 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
72a61959e2
commit
7f9fde8c1d
@ -450,7 +450,7 @@ uint32_t RsGRouterMatrixFriendListItem::serial_size() const
|
||||
{
|
||||
uint32_t s = 8 ; // header
|
||||
s += 4 ; // reverse_friend_indices.size()
|
||||
s += RsFileHash::SIZE_IN_BYTES * reverse_friend_indices.size() ; // sha1 for published_key
|
||||
s += RsPeerId::SIZE_IN_BYTES * reverse_friend_indices.size() ; // sha1 for published_key
|
||||
|
||||
return s ;
|
||||
}
|
||||
|
@ -553,7 +553,7 @@ std::set<uint32_t> p3GRouter::computeRoutingFriends(const std::vector<RsPeerId>&
|
||||
int k=0; total=probas[0] ; while(total<r) total += probas[++k];
|
||||
|
||||
#ifdef GROUTER_DEBUG
|
||||
grouter_debug() << " => Friend " << i << ", between 0 and " << p-1 << ": chose k=" << k << ", peer=" << pids[k] << " with probability " << probas[k] << std::endl;
|
||||
grouter_debug() << " => Friend " << i << ", between 0 and " << N-1 << ": chose k=" << k << ", peer=" << pids[k] << " with probability " << probas[k] << std::endl;
|
||||
#endif
|
||||
|
||||
res.insert(k) ;
|
||||
@ -772,6 +772,7 @@ void p3GRouter::handleRecvACKItem(RsGRouterACKItem *item)
|
||||
grouter_debug() << " ==> final weight : " << weight << std::endl;
|
||||
#endif
|
||||
_routing_matrix.addRoutingClue(it->second.destination_key,item->PeerId(),weight) ;
|
||||
_changed = true ;
|
||||
}
|
||||
#ifdef GROUTER_DEBUG
|
||||
grouter_debug() << " Removing friend try for peer " << item->PeerId() << ". " << it->second.tried_friends.size() << " tries left." << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user