Work on ripple paths.

This commit is contained in:
Arthur Britto
2012-08-19 21:36:25 -07:00
parent fbd67bda89
commit 7e30db94b4
3 changed files with 33 additions and 13 deletions

View File

@@ -5,6 +5,7 @@
#include "SerializedTypes.h"
#include "SerializedObject.h"
#include "TransactionFormats.h"
#include "Log.h"
#include "NewcoinAddress.h"
#include "utils.h"
@@ -308,7 +309,11 @@ STPathSet* STPathSet::construct(SerializerIterator& s, const char *name)
if (iType == STPathElement::typeEnd || iType == STPathElement::typeBoundary)
{
if (path.empty())
{
Log(lsINFO) << "STPathSet: Empty path.";
throw std::runtime_error("empty path");
}
paths.push_back(path);
path.clear();
@@ -320,13 +325,15 @@ STPathSet* STPathSet::construct(SerializerIterator& s, const char *name)
}
else if (iType & ~STPathElement::typeValidBits)
{
Log(lsINFO) << "STPathSet: Bad path element: " << iType;
throw std::runtime_error("bad path element");
}
else
{
bool bAccount = !!(iType & STPathElement::typeAccount);
bool bCurrency = !!(iType & STPathElement::typeCurrency);
bool bIssuer = !!(iType & STPathElement::typeIssuer);
const bool bAccount = !!(iType & STPathElement::typeAccount);
const bool bCurrency = !!(iType & STPathElement::typeCurrency);
const bool bIssuer = !!(iType & STPathElement::typeIssuer);
uint160 uAccountID;
uint160 uCurrency;