Added more traces
This commit is contained in:
@@ -408,7 +408,9 @@ namespace cryptonote
|
|||||||
|
|
||||||
BEGIN_SERIALIZE_OBJECT()
|
BEGIN_SERIALIZE_OBJECT()
|
||||||
VARINT_FIELD_N("major_version", b.major_version);
|
VARINT_FIELD_N("major_version", b.major_version);
|
||||||
|
puts("[1");
|
||||||
if(b.major_version > CURRENT_BYTECOIN_BLOCK_MAJOR_VERSION) return false;
|
if(b.major_version > CURRENT_BYTECOIN_BLOCK_MAJOR_VERSION) return false;
|
||||||
|
puts("]1");
|
||||||
VARINT_FIELD_N("minor_version", b.minor_version);
|
VARINT_FIELD_N("minor_version", b.minor_version);
|
||||||
VARINT_FIELD(timestamp);
|
VARINT_FIELD(timestamp);
|
||||||
FIELD_N("prev_id", b.prev_id);
|
FIELD_N("prev_id", b.prev_id);
|
||||||
@@ -481,7 +483,9 @@ namespace cryptonote
|
|||||||
|
|
||||||
BEGIN_SERIALIZE()
|
BEGIN_SERIALIZE()
|
||||||
VARINT_FIELD(major_version)
|
VARINT_FIELD(major_version)
|
||||||
|
puts("[2");
|
||||||
if(major_version > BLOCK_MAJOR_VERSION_3) return false;
|
if(major_version > BLOCK_MAJOR_VERSION_3) return false;
|
||||||
|
puts("]2");
|
||||||
VARINT_FIELD(minor_version)
|
VARINT_FIELD(minor_version)
|
||||||
if (BLOCK_MAJOR_VERSION_1 == major_version)
|
if (BLOCK_MAJOR_VERSION_1 == major_version)
|
||||||
{
|
{
|
||||||
@@ -504,11 +508,13 @@ namespace cryptonote
|
|||||||
|
|
||||||
BEGIN_SERIALIZE_OBJECT()
|
BEGIN_SERIALIZE_OBJECT()
|
||||||
FIELDS(*static_cast<block_header *>(this))
|
FIELDS(*static_cast<block_header *>(this))
|
||||||
|
puts("[3");
|
||||||
if (BLOCK_MAJOR_VERSION_2 <= major_version)
|
if (BLOCK_MAJOR_VERSION_2 <= major_version)
|
||||||
{
|
{
|
||||||
auto sbb = make_serializable_bytecoin_block(*this, false, false);
|
auto sbb = make_serializable_bytecoin_block(*this, false, false);
|
||||||
FIELD_N("parent_block", sbb);
|
FIELD_N("parent_block", sbb);
|
||||||
}
|
}
|
||||||
|
puts("]3");
|
||||||
FIELD(miner_tx)
|
FIELD(miner_tx)
|
||||||
FIELD(tx_hashes)
|
FIELD(tx_hashes)
|
||||||
END_SERIALIZE()
|
END_SERIALIZE()
|
||||||
|
|||||||
@@ -83,9 +83,7 @@ NAN_METHOD(convert_blob) {
|
|||||||
|
|
||||||
//convert
|
//convert
|
||||||
block b = AUTO_VAL_INIT(b);
|
block b = AUTO_VAL_INIT(b);
|
||||||
puts("[1");
|
|
||||||
if (!parse_and_validate_block_from_blob(input, b)) return THROW_ERROR_EXCEPTION("Failed to parse block");
|
if (!parse_and_validate_block_from_blob(input, b)) return THROW_ERROR_EXCEPTION("Failed to parse block");
|
||||||
puts("]1");
|
|
||||||
|
|
||||||
if (b.major_version < BLOCK_MAJOR_VERSION_2) {
|
if (b.major_version < BLOCK_MAJOR_VERSION_2) {
|
||||||
if (!get_block_hashing_blob(b, output)) return THROW_ERROR_EXCEPTION("Failed to create mining block");
|
if (!get_block_hashing_blob(b, output)) return THROW_ERROR_EXCEPTION("Failed to create mining block");
|
||||||
|
|||||||
Reference in New Issue
Block a user