aboutsummaryrefslogtreecommitdiff
path: root/src/serialization
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2024-07-16 18:56:44 -0400
committerluigi1111 <luigi1111w@gmail.com>2024-07-16 18:56:44 -0400
commitcfd7f5222d17af781ea0eece8522a15173c36dd5 (patch)
tree6e4eb2b68613221e128593ab456f2a6345930412 /src/serialization
parentMerge pull request #9353 (diff)
parentFix ZMQ Tx Pruning (diff)
downloadmonero-cfd7f5222d17af781ea0eece8522a15173c36dd5.tar.xz
Merge pull request #9370
9fc48f4 Fix ZMQ Tx Pruning (Lee Clagett)
Diffstat (limited to 'src/serialization')
-rw-r--r--src/serialization/json_object.cpp9
-rw-r--r--src/serialization/json_object.h2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/serialization/json_object.cpp b/src/serialization/json_object.cpp
index 4269c2294..bf2b90e8e 100644
--- a/src/serialization/json_object.cpp
+++ b/src/serialization/json_object.cpp
@@ -273,7 +273,10 @@ void toJsonValue(rapidjson::Writer<epee::byte_stream>& dest, const cryptonote::t
{
INSERT_INTO_JSON_OBJECT(dest, signatures, tx.signatures);
}
- INSERT_INTO_JSON_OBJECT(dest, ringct, tx.rct_signatures);
+ {
+ dest.Key("ringct");
+ toJsonValue(dest, tx.rct_signatures, tx.pruned);
+ }
dest.EndObject();
}
@@ -1111,7 +1114,7 @@ void fromJsonValue(const rapidjson::Value& val, cryptonote::rpc::BlockHeaderResp
GET_FROM_JSON_OBJECT(val, response.reward, reward);
}
-void toJsonValue(rapidjson::Writer<epee::byte_stream>& dest, const rct::rctSig& sig)
+void toJsonValue(rapidjson::Writer<epee::byte_stream>& dest, const rct::rctSig& sig, const bool prune)
{
using boost::adaptors::transform;
@@ -1131,7 +1134,7 @@ void toJsonValue(rapidjson::Writer<epee::byte_stream>& dest, const rct::rctSig&
}
// prunable
- if (!sig.p.bulletproofs.empty() || !sig.p.bulletproofs_plus.empty() || !sig.p.rangeSigs.empty() || !sig.p.MGs.empty() || !sig.get_pseudo_outs().empty())
+ if (!prune && (!sig.p.bulletproofs.empty() || !sig.p.bulletproofs_plus.empty() || !sig.p.rangeSigs.empty() || !sig.p.MGs.empty() || !sig.get_pseudo_outs().empty()))
{
dest.Key("prunable");
dest.StartObject();
diff --git a/src/serialization/json_object.h b/src/serialization/json_object.h
index 08ddd570b..3dfff3336 100644
--- a/src/serialization/json_object.h
+++ b/src/serialization/json_object.h
@@ -281,7 +281,7 @@ void fromJsonValue(const rapidjson::Value& val, cryptonote::rpc::error& error);
void toJsonValue(rapidjson::Writer<epee::byte_stream>& dest, const cryptonote::rpc::BlockHeaderResponse& response);
void fromJsonValue(const rapidjson::Value& val, cryptonote::rpc::BlockHeaderResponse& response);
-void toJsonValue(rapidjson::Writer<epee::byte_stream>& dest, const rct::rctSig& i);
+void toJsonValue(rapidjson::Writer<epee::byte_stream>& dest, const rct::rctSig& sig, bool prune);
void fromJsonValue(const rapidjson::Value& val, rct::rctSig& sig);
void fromJsonValue(const rapidjson::Value& val, rct::ctkey& key);