Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f703a05ff | |||
| c2ce9edbbe | |||
| cee6e90241 | |||
| 14748346e2 |
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cryptoforknote-util",
|
||||
"version": "1.0.1",
|
||||
"version": "2.0.0",
|
||||
"main": "cryptoforknote-util",
|
||||
"author": {
|
||||
"name": "LucasJones",
|
||||
|
||||
@@ -7,4 +7,5 @@ enum BLOB_TYPE {
|
||||
BLOB_TYPE_FORKNOTE1 = 1,
|
||||
BLOB_TYPE_FORKNOTE2 = 2,
|
||||
BLOB_TYPE_CRYPTONOTE2 = 3, // Masari
|
||||
BLOB_TYPE_CRYPTONOTE_RYO = 4, // Ryo
|
||||
};
|
||||
@@ -141,6 +141,7 @@ namespace cryptonote
|
||||
{
|
||||
|
||||
public:
|
||||
enum BLOB_TYPE blob_type;
|
||||
// tx information
|
||||
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
|
||||
@@ -160,13 +161,12 @@ namespace cryptonote
|
||||
|
||||
|
||||
protected:
|
||||
transaction_prefix(){}
|
||||
transaction_prefix() : blob_type(BLOB_TYPE_CRYPTONOTE) {}
|
||||
};
|
||||
|
||||
class transaction: public transaction_prefix
|
||||
{
|
||||
public:
|
||||
enum BLOB_TYPE blob_type;
|
||||
std::vector<std::vector<crypto::signature> > signatures; //count signatures always the same as inputs count
|
||||
rct::rctSig rct_signatures;
|
||||
|
||||
@@ -235,7 +235,7 @@ namespace cryptonote
|
||||
};
|
||||
|
||||
inline
|
||||
transaction::transaction() : blob_type(BLOB_TYPE_CRYPTONOTE)
|
||||
transaction::transaction()
|
||||
{
|
||||
set_null();
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace cryptonote
|
||||
void get_transaction_prefix_hash(const transaction_prefix& tx, crypto::hash& h)
|
||||
{
|
||||
std::ostringstream s;
|
||||
if (tx.blob_type == BLOB_TYPE_CRYPTONOTE_RYO) s << "ryo-currency";
|
||||
binary_archive<true> a(s);
|
||||
::serialization::serialize(a, const_cast<transaction_prefix&>(tx));
|
||||
crypto::cn_fast_hash(s.str().data(), s.str().size(), h);
|
||||
|
||||
Reference in New Issue
Block a user