mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Bugfixes.
This commit is contained in:
@@ -79,22 +79,30 @@ bool TransactionAcquire::takeNodes(const std::list<SHAMapNode>& nodeIDs,
|
||||
return true;
|
||||
if (mFailed)
|
||||
return false;
|
||||
std::list<SHAMapNode>::const_iterator nodeIDit = nodeIDs.begin();
|
||||
std::list< std::vector<unsigned char> >::const_iterator nodeDatait = data.begin();
|
||||
while (nodeIDit != nodeIDs.end())
|
||||
try
|
||||
{
|
||||
if (nodeIDit->isRoot())
|
||||
std::list<SHAMapNode>::const_iterator nodeIDit = nodeIDs.begin();
|
||||
std::list< std::vector<unsigned char> >::const_iterator nodeDatait = data.begin();
|
||||
while (nodeIDit != nodeIDs.end())
|
||||
{
|
||||
if (!mMap->addRootNode(getHash(), *nodeDatait))
|
||||
if (nodeIDit->isRoot())
|
||||
{
|
||||
if (!mMap->addRootNode(getHash(), *nodeDatait))
|
||||
return false;
|
||||
}
|
||||
else if (!mMap->addKnownNode(*nodeIDit, *nodeDatait))
|
||||
return false;
|
||||
++nodeIDit;
|
||||
++nodeDatait;
|
||||
}
|
||||
else if (!mMap->addKnownNode(*nodeIDit, *nodeDatait))
|
||||
return false;
|
||||
++nodeIDit;
|
||||
++nodeDatait;
|
||||
trigger(peer);
|
||||
return true;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
Log(lsERROR) << "Peer sends us junky transaction node data";
|
||||
return false;
|
||||
}
|
||||
trigger(peer);
|
||||
return true;
|
||||
}
|
||||
|
||||
void LCTransaction::setVote(const uint256& peer, bool votesYes)
|
||||
|
||||
Reference in New Issue
Block a user