Added Loki support

This commit is contained in:
MoneroOcean
2018-09-10 22:07:41 +02:00
parent 7f703a05ff
commit 473f81f81b
3 changed files with 16 additions and 0 deletions

View File

@@ -8,4 +8,5 @@ enum BLOB_TYPE {
BLOB_TYPE_FORKNOTE2 = 2,
BLOB_TYPE_CRYPTONOTE2 = 3, // Masari
BLOB_TYPE_CRYPTONOTE_RYO = 4, // Ryo
BLOB_TYPE_CRYPTONOTE_LOKI = 5, // Loki
};

View File

@@ -151,8 +151,16 @@ namespace cryptonote
//extra
std::vector<uint8_t> extra;
std::vector<uint64_t> output_unlock_times;
bool is_deregister;
BEGIN_SERIALIZE()
VARINT_FIELD(version)
if (blob_type == BLOB_TYPE_CRYPTONOTE_LOKI)
{
FIELD(output_unlock_times)
FIELD(is_deregister)
}
VARINT_FIELD(unlock_time)
FIELD(vin)
FIELD(vout)

View File

@@ -45,6 +45,13 @@ inline bool do_serialize(Archive &ar, T &v)
return ::serializer<Archive, T>::serialize(ar, v);
}
template <class Archive>
inline bool do_serialize(Archive &ar, bool &v)
{
ar.serialize_blob(&v, sizeof(v));
return true;
}
#ifndef __GNUC__
#ifndef constexpr
#define constexpr