mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Make 'getNodeFat' throw an exception if a node that's not in the map is requested.
Log the context when this exception is thrown.
This commit is contained in:
@@ -99,8 +99,8 @@ bool SHAMap::getNodeFat(const SHAMapNode& wanted, std::vector<SHAMapNode>& nodeI
|
||||
SHAMapTreeNode::pointer node = getNode(wanted);
|
||||
if (!node)
|
||||
{
|
||||
cLog(lsWARNING) << "peer requested node we don't have: " << wanted;
|
||||
return false;
|
||||
cLog(lsWARNING) << "peer requested node that not in the map: " << wanted;
|
||||
throw std::runtime_error("Peer requested node not in map");
|
||||
}
|
||||
|
||||
nodeIDs.push_back(*node);
|
||||
|
||||
Reference in New Issue
Block a user