From f113b92b9320d2300f9d493b63fb6edfd292acdc Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Mon, 27 Feb 2017 20:24:39 +0000 Subject: core: add functions to serialize base tx info That is, information without signatures (for v1) nor range proofs and MGs (for v2) --- src/cryptonote_basic/cryptonote_format_utils.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/cryptonote_basic/cryptonote_format_utils.cpp') diff --git a/src/cryptonote_basic/cryptonote_format_utils.cpp b/src/cryptonote_basic/cryptonote_format_utils.cpp index 89cd013ae..6baa57d26 100644 --- a/src/cryptonote_basic/cryptonote_format_utils.cpp +++ b/src/cryptonote_basic/cryptonote_format_utils.cpp @@ -93,6 +93,16 @@ namespace cryptonote return true; } //--------------------------------------------------------------- + bool parse_and_validate_tx_base_from_blob(const blobdata& tx_blob, transaction& tx) + { + std::stringstream ss; + ss << tx_blob; + binary_archive ba(ss); + bool r = tx.serialize_base(ba); + CHECK_AND_ASSERT_MES(r, false, "Failed to parse transaction from blob"); + return true; + } + //--------------------------------------------------------------- bool parse_and_validate_tx_from_blob(const blobdata& tx_blob, transaction& tx, crypto::hash& tx_hash, crypto::hash& tx_prefix_hash) { std::stringstream ss; -- cgit v1.2.3