mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Ripple tentatively implemented
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user