Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 473f81f81b | |||
| 7f703a05ff | |||
| c2ce9edbbe | |||
| cee6e90241 | |||
| 14748346e2 | |||
| 5cb4d4a460 | |||
| 34de91e798 |
+2
-2
@@ -25,10 +25,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"cflags_c": [
|
"cflags_c": [
|
||||||
"-fno-exceptions -std=gnu11 -march=native -fPIC -m64 -DNDEBUG -Ofast -funroll-loops -fvariable-expansion-in-unroller -ftree-loop-if-convert-stores -fmerge-all-constants -fbranch-target-load-optimize2"
|
"-fno-exceptions -std=gnu11 -march=native -fPIC -DNDEBUG -Ofast -funroll-loops -fvariable-expansion-in-unroller -ftree-loop-if-convert-stores -fmerge-all-constants -fbranch-target-load-optimize2"
|
||||||
],
|
],
|
||||||
"cflags_cc": [
|
"cflags_cc": [
|
||||||
"-fexceptions -frtti -std=gnu++11 -march=native -fPIC -m64 -DNDEBUG -Ofast -s -funroll-loops -fvariable-expansion-in-unroller -ftree-loop-if-convert-stores -fmerge-all-constants -fbranch-target-load-optimize2"
|
"-fexceptions -frtti -std=gnu++11 -march=native -fPIC -DNDEBUG -Ofast -s -funroll-loops -fvariable-expansion-in-unroller -ftree-loop-if-convert-stores -fmerge-all-constants -fbranch-target-load-optimize2"
|
||||||
],
|
],
|
||||||
"xcode_settings": {
|
"xcode_settings": {
|
||||||
"OTHER_CFLAGS": [ "-fexceptions -frtti" ]
|
"OTHER_CFLAGS": [ "-fexceptions -frtti" ]
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cryptoforknote-util",
|
"name": "cryptoforknote-util",
|
||||||
"version": "1.0.0",
|
"version": "2.0.0",
|
||||||
"main": "cryptoforknote-util",
|
"main": "cryptoforknote-util",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "LucasJones",
|
"name": "LucasJones",
|
||||||
|
|||||||
@@ -7,4 +7,6 @@ enum BLOB_TYPE {
|
|||||||
BLOB_TYPE_FORKNOTE1 = 1,
|
BLOB_TYPE_FORKNOTE1 = 1,
|
||||||
BLOB_TYPE_FORKNOTE2 = 2,
|
BLOB_TYPE_FORKNOTE2 = 2,
|
||||||
BLOB_TYPE_CRYPTONOTE2 = 3, // Masari
|
BLOB_TYPE_CRYPTONOTE2 = 3, // Masari
|
||||||
|
BLOB_TYPE_CRYPTONOTE_RYO = 4, // Ryo
|
||||||
|
BLOB_TYPE_CRYPTONOTE_LOKI = 5, // Loki
|
||||||
};
|
};
|
||||||
@@ -141,6 +141,7 @@ namespace cryptonote
|
|||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
enum BLOB_TYPE blob_type;
|
||||||
// tx information
|
// tx information
|
||||||
size_t version;
|
size_t version;
|
||||||
uint64_t unlock_time; //number of block (or time), used as a limitation like: spend this tx not early then block/time
|
uint64_t unlock_time; //number of block (or time), used as a limitation like: spend this tx not early then block/time
|
||||||
@@ -150,8 +151,16 @@ namespace cryptonote
|
|||||||
//extra
|
//extra
|
||||||
std::vector<uint8_t> extra;
|
std::vector<uint8_t> extra;
|
||||||
|
|
||||||
|
std::vector<uint64_t> output_unlock_times;
|
||||||
|
bool is_deregister;
|
||||||
|
|
||||||
BEGIN_SERIALIZE()
|
BEGIN_SERIALIZE()
|
||||||
VARINT_FIELD(version)
|
VARINT_FIELD(version)
|
||||||
|
if (blob_type == BLOB_TYPE_CRYPTONOTE_LOKI)
|
||||||
|
{
|
||||||
|
FIELD(output_unlock_times)
|
||||||
|
FIELD(is_deregister)
|
||||||
|
}
|
||||||
VARINT_FIELD(unlock_time)
|
VARINT_FIELD(unlock_time)
|
||||||
FIELD(vin)
|
FIELD(vin)
|
||||||
FIELD(vout)
|
FIELD(vout)
|
||||||
@@ -160,13 +169,12 @@ namespace cryptonote
|
|||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
transaction_prefix(){}
|
transaction_prefix() : blob_type(BLOB_TYPE_CRYPTONOTE) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class transaction: public transaction_prefix
|
class transaction: public transaction_prefix
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum BLOB_TYPE blob_type;
|
|
||||||
std::vector<std::vector<crypto::signature> > signatures; //count signatures always the same as inputs count
|
std::vector<std::vector<crypto::signature> > signatures; //count signatures always the same as inputs count
|
||||||
rct::rctSig rct_signatures;
|
rct::rctSig rct_signatures;
|
||||||
|
|
||||||
@@ -235,7 +243,7 @@ namespace cryptonote
|
|||||||
};
|
};
|
||||||
|
|
||||||
inline
|
inline
|
||||||
transaction::transaction() : blob_type(BLOB_TYPE_CRYPTONOTE)
|
transaction::transaction()
|
||||||
{
|
{
|
||||||
set_null();
|
set_null();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ namespace cryptonote
|
|||||||
void get_transaction_prefix_hash(const transaction_prefix& tx, crypto::hash& h)
|
void get_transaction_prefix_hash(const transaction_prefix& tx, crypto::hash& h)
|
||||||
{
|
{
|
||||||
std::ostringstream s;
|
std::ostringstream s;
|
||||||
|
if (tx.blob_type == BLOB_TYPE_CRYPTONOTE_RYO) s << "ryo-currency";
|
||||||
binary_archive<true> a(s);
|
binary_archive<true> a(s);
|
||||||
::serialization::serialize(a, const_cast<transaction_prefix&>(tx));
|
::serialization::serialize(a, const_cast<transaction_prefix&>(tx));
|
||||||
crypto::cn_fast_hash(s.str().data(), s.str().size(), h);
|
crypto::cn_fast_hash(s.str().data(), s.str().size(), h);
|
||||||
|
|||||||
@@ -45,6 +45,13 @@ inline bool do_serialize(Archive &ar, T &v)
|
|||||||
return ::serializer<Archive, T>::serialize(ar, 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 __GNUC__
|
||||||
#ifndef constexpr
|
#ifndef constexpr
|
||||||
#define constexpr
|
#define constexpr
|
||||||
|
|||||||
Reference in New Issue
Block a user