Skip to content

Commit

Permalink
Added Loki support
Browse files Browse the repository at this point in the history
  • Loading branch information
MoneroOcean committed Sep 10, 2018
1 parent 7f703a0 commit 473f81f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cryptonote_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
8 changes: 8 additions & 0 deletions src/cryptonote_core/cryptonote_basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions src/serialization/serialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 473f81f

Please sign in to comment.