From 53db771c3560f63d7aad204f999bcd2eea3b2ce3 Mon Sep 17 00:00:00 2001 From: Some Random Crypto Guy Date: Mon, 19 May 2025 12:17:00 +0100 Subject: [PATCH] removed serialisation of unlock_time for txout_to_carrot_v1 output type --- src/cryptonote_basic/cryptonote_basic.h | 1 - src/cryptonote_basic/cryptonote_boost_serialization.h | 1 - src/cryptonote_basic/cryptonote_format_utils.cpp | 2 +- src/serialization/json_object.cpp | 2 -- 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/cryptonote_basic/cryptonote_basic.h b/src/cryptonote_basic/cryptonote_basic.h index 41d9684bb..3d540e7d1 100644 --- a/src/cryptonote_basic/cryptonote_basic.h +++ b/src/cryptonote_basic/cryptonote_basic.h @@ -68,7 +68,6 @@ namespace cryptonote { crypto::public_key key; // K_o std::string asset_type; - uint64_t unlock_time; carrot::view_tag_t view_tag; // vt carrot::encrypted_janus_anchor_t encrypted_janus_anchor; // anchor_enc diff --git a/src/cryptonote_basic/cryptonote_boost_serialization.h b/src/cryptonote_basic/cryptonote_boost_serialization.h index 17d9e814d..31bc3265e 100644 --- a/src/cryptonote_basic/cryptonote_boost_serialization.h +++ b/src/cryptonote_basic/cryptonote_boost_serialization.h @@ -113,7 +113,6 @@ namespace boost { a & x.key; a & x.asset_type; - a & x.unlock_time; a & x.view_tag; a & x.encrypted_janus_anchor; } diff --git a/src/cryptonote_basic/cryptonote_format_utils.cpp b/src/cryptonote_basic/cryptonote_format_utils.cpp index 8f194190f..3d8db51ce 100644 --- a/src/cryptonote_basic/cryptonote_format_utils.cpp +++ b/src/cryptonote_basic/cryptonote_format_utils.cpp @@ -1328,7 +1328,7 @@ namespace cryptonote else if (out.target.type() == typeid(txout_to_tagged_key)) output_unlock_time = boost::get< txout_to_tagged_key >(out.target).unlock_time; else if (out.target.type() == typeid(txout_to_carrot_v1)) - output_unlock_time = boost::get(out.target).unlock_time; + output_unlock_time = 0; else { LOG_ERROR("Unexpected output target type found: " << out.target.type().name() << " - cannot retrieve output_unlock_time"); diff --git a/src/serialization/json_object.cpp b/src/serialization/json_object.cpp index 8a87e4e49..db7e6cd87 100644 --- a/src/serialization/json_object.cpp +++ b/src/serialization/json_object.cpp @@ -626,7 +626,6 @@ void toJsonValue(rapidjson::Writer& dest, const cryptonote::t INSERT_INTO_JSON_OBJECT(dest, key, txout.key); INSERT_INTO_JSON_OBJECT(dest, asset_type, txout.asset_type); - INSERT_INTO_JSON_OBJECT(dest, unlock_time, txout.unlock_time); INSERT_INTO_JSON_OBJECT(dest, view_tag, txout.view_tag); INSERT_INTO_JSON_OBJECT(dest, encrypted_janus_anchor, txout.encrypted_janus_anchor); @@ -642,7 +641,6 @@ void fromJsonValue(const rapidjson::Value& val, cryptonote::txout_to_carrot_v1& GET_FROM_JSON_OBJECT(val, txout.key, key); GET_FROM_JSON_OBJECT(val, txout.asset_type, asset_type); - GET_FROM_JSON_OBJECT(val, txout.unlock_time, unlock_time); GET_FROM_JSON_OBJECT(val, txout.view_tag, view_tag); GET_FROM_JSON_OBJECT(val, txout.encrypted_janus_anchor, encrypted_janus_anchor); }