1
0
Fork 0
forked from lthn/blockchain

tx_out_zarcanum

This commit is contained in:
sowle 2022-05-09 17:29:25 +02:00
parent 7e2d0fcb6b
commit 116011fdcf
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
2 changed files with 35 additions and 1 deletions

View file

@ -294,6 +294,31 @@ namespace currency
};
#pragma pack(push, 1)
struct tx_out_zarcanum
{
tx_out_zarcanum() {}
// Boost's Assignable concept
tx_out_zarcanum(const tx_out_zarcanum&) = default;
tx_out_zarcanum& operator=(const tx_out_zarcanum&) = default;
crypto::public_key stealth_address;
crypto::public_key concealing_point;
crypto::public_key commitment;
uint64_t encrypted_amount;
BEGIN_SERIALIZE_OBJECT()
FIELD(stealth_address)
FIELD(concealing_point)
FIELD(commitment)
FIELD(encrypted_amount)
END_SERIALIZE()
};
#pragma pack(pop)
typedef boost::variant<tx_out, tx_out_zarcanum> tx_out_v;
struct tx_comment
{
@ -814,6 +839,8 @@ SET_VARIANT_TAGS(currency::extra_alias_entry, 33, "alias_entry2");
SET_VARIANT_TAGS(currency::txin_htlc, 34, "txin_htlc");
SET_VARIANT_TAGS(currency::txout_htlc, 35, "txout_htlc");
// Zarcanum
SET_VARIANT_TAGS(currency::tx_out_zarcanum, 36, "tx_out_zarcanum");
#undef SET_VARIANT_TAGS

View file

@ -110,7 +110,14 @@ namespace boost
a & x.target;
}
template <class Archive>
inline void serialize(Archive &a, currency::tx_out_zarcanum &x, const boost::serialization::version_type ver)
{
a & x.stealth_address;
a & x.concealing_point;
a & x.commitment;
a & x.encrypted_amount;
}
template <class Archive>
inline void serialize(Archive &a, currency::tx_comment &x, const boost::serialization::version_type ver)