Ripple tentatively implemented

This commit is contained in:
MJK
2012-10-04 18:21:05 -07:00
parent b3bc566655
commit 50a993e921
6 changed files with 113 additions and 25 deletions

View File

@@ -10,10 +10,35 @@
#include "Log.h"
#include "NewcoinAddress.h"
#include "utils.h"
#include "NewcoinAddress.h"
STAmount saZero(CURRENCY_ONE, ACCOUNT_ONE, 0);
STAmount saOne(CURRENCY_ONE, ACCOUNT_ONE, 1);
void STPathSet::printDebug() {
for (int i = 0; i < value.size(); i++) {
std::cout << i << ": ";
for (int j = 0; j < value[i].mPath.size(); j++) {
//STPathElement pe = value[i].mPath[j];
NewcoinAddress nad;
nad.setAccountID(value[i].mPath[j].mAccountID);
std::cout << " " << nad.humanAccountID();
//std::cout << " " << pe.mAccountID.GetHex();
}
std::cout << std::endl;
}
}
void STPath::printDebug() {
std::cout << "STPath:" << std::endl;
for(int i =0; i < mPath.size(); i++) {
NewcoinAddress nad;
nad.setAccountID(mPath[i].mAccountID);
std::cout << " " << i << ": " << nad.humanAccountID() << std::endl;
}
}
std::string SerializedType::getFullText() const
{
std::string ret;
@@ -331,6 +356,16 @@ bool STPathSet::isEquivalent(const SerializedType& t) const
return v && (value == v->value);
}
bool STPath::hasSeen(const uint160 &acct) {
for (int i = 0; i < mPath.size();i++) {
STPathElement ele = getElement(i);
if (ele.getAccountID() == acct)
return true;
}
return false;
}
int STPath::getSerializeSize() const
{
int iBytes = 0;