Some adjustements
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#define CRYPTONOTE_PUBLIC_ADDRESS_TEXTBLOB_VER 0
|
||||
#define CURRENT_TRANSACTION_VERSION 2
|
||||
#define CURRENT_TRANSACTION_VERSION 1
|
||||
#define CURRENT_BLOCK_MAJOR_VERSION 1
|
||||
#define CURRENT_BLOCK_MINOR_VERSION 0
|
||||
|
||||
#define BLOCK_MAJOR_VERSION_1 1
|
||||
#define BLOCK_MAJOR_VERSION_2 3
|
||||
#define BLOCK_MAJOR_VERSION_2 2
|
||||
#define BLOCK_MAJOR_VERSION_3 3
|
||||
|
||||
#define COIN ((uint64_t)100000000) // pow(10, 8)
|
||||
|
||||
@@ -174,7 +174,10 @@ namespace cryptonote
|
||||
|
||||
BEGIN_SERIALIZE()
|
||||
VARINT_FIELD(version)
|
||||
if(CURRENT_TRANSACTION_VERSION < version) return false;
|
||||
if(CURRENT_TRANSACTION_VERSION < version) {
|
||||
puts("!!! Too high tx version for serialization");
|
||||
return false;
|
||||
}
|
||||
VARINT_FIELD(unlock_time)
|
||||
FIELD(vin)
|
||||
FIELD(vout)
|
||||
@@ -408,7 +411,10 @@ namespace cryptonote
|
||||
|
||||
BEGIN_SERIALIZE_OBJECT()
|
||||
VARINT_FIELD_N("major_version", b.major_version);
|
||||
if(b.major_version > CURRENT_BYTECOIN_BLOCK_MAJOR_VERSION) return false;
|
||||
if(b.major_version > CURRENT_BYTECOIN_BLOCK_MAJOR_VERSION) {
|
||||
puts("!!! Too high bytecoin version to serialize it");
|
||||
return false;
|
||||
}
|
||||
VARINT_FIELD_N("minor_version", b.minor_version);
|
||||
VARINT_FIELD(timestamp);
|
||||
FIELD_N("prev_id", b.prev_id);
|
||||
|
||||
@@ -956,7 +956,7 @@ namespace cryptonote
|
||||
{
|
||||
case BLOCK_MAJOR_VERSION_1: return check_proof_of_work_v1(bl, current_diffic, proof_of_work);
|
||||
case BLOCK_MAJOR_VERSION_2: return check_proof_of_work_v2(bl, current_diffic, proof_of_work);
|
||||
//case BLOCK_MAJOR_VERSION_3: return check_proof_of_work_v2(bl, current_diffic, proof_of_work);
|
||||
case BLOCK_MAJOR_VERSION_3: return check_proof_of_work_v2(bl, current_diffic, proof_of_work);
|
||||
}
|
||||
|
||||
CHECK_AND_ASSERT_MES(false, false, "unknown block major version: " << bl.major_version << "." << bl.minor_version);
|
||||
|
||||
Reference in New Issue
Block a user