mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +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)
|
||||
|
||||
@@ -440,7 +440,7 @@ bool NetworkOPs::recvPropose(const uint256& prevLgr, uint32 proposeSeq, const ui
|
||||
const std::string& pubKey, const std::string& signature)
|
||||
{
|
||||
if (mMode != omFULL) // FIXME: Should we relay?
|
||||
Log(lsWARNING) << "Received proposal when not full" << mMode;
|
||||
Log(lsWARNING) << "Received proposal when not full: " << mMode;
|
||||
if (!mConsensus)
|
||||
{
|
||||
return true;
|
||||
|
||||
@@ -196,6 +196,7 @@ SHAMapTreeNode::SHAMapTreeNode(const SHAMapNode& id, const std::vector<unsigned
|
||||
int type = s.removeLastByte();
|
||||
int len = s.getLength();
|
||||
if ((type < 0) || (type > 3)) throw SHAMapException(InvalidNode);
|
||||
assert(len >= 33);
|
||||
|
||||
if (type == 0)
|
||||
{ // transaction
|
||||
|
||||
Reference in New Issue
Block a user