mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Merge branch 'master' of github.com:jedmccaleb/NewCoin
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "SerializedObject.h"
|
||||
#include "TransactionFormats.h"
|
||||
#include "NewcoinAddress.h"
|
||||
#include "utils.h"
|
||||
|
||||
std::string SerializedType::getFullText() const
|
||||
{
|
||||
@@ -133,15 +134,6 @@ bool STHash256::isEquivalent(const SerializedType& t) const
|
||||
return v && (value == v->value);
|
||||
}
|
||||
|
||||
static std::string hex(const std::vector<unsigned char>& value)
|
||||
{
|
||||
int dlen=value.size(), i=0;
|
||||
char psz[dlen*2 + 1];
|
||||
for(std::vector<unsigned char>::const_iterator it=value.begin(), end=value.end(); it!=end; ++it)
|
||||
sprintf(psz + 2*(i++), "%02X", *it);
|
||||
return std::string(psz, psz + value.size()*2);
|
||||
}
|
||||
|
||||
STVariableLength::STVariableLength(SerializerIterator& st, const char *name) : SerializedType(name)
|
||||
{
|
||||
value = st.getVL();
|
||||
@@ -149,7 +141,7 @@ STVariableLength::STVariableLength(SerializerIterator& st, const char *name) : S
|
||||
|
||||
std::string STVariableLength::getText() const
|
||||
{
|
||||
return hex(value);
|
||||
return strHex(value);
|
||||
}
|
||||
|
||||
STVariableLength* STVariableLength::construct(SerializerIterator& u, const char *name)
|
||||
@@ -230,7 +222,7 @@ std::string STTaggedList::getText() const
|
||||
{
|
||||
ret += boost::lexical_cast<std::string>(it->first);
|
||||
ret += ",";
|
||||
ret += hex(it->second);
|
||||
ret += strHex(it->second);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user