diff --git a/src/seraphis_core/jamtis_payment_proposal.cpp b/src/seraphis_core/jamtis_payment_proposal.cpp index 74b7d862f86..667396d00a2 100644 --- a/src/seraphis_core/jamtis_payment_proposal.cpp +++ b/src/seraphis_core/jamtis_payment_proposal.cpp @@ -99,6 +99,19 @@ static void get_output_proposal_address_parts_v1(const rct::key &q, } //------------------------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------------------------- +/// equality operators +bool operator==(const JamtisPaymentProposalV1 a, const JamtisPaymentProposalV1 b) +{ + return a.destination == b.destination && a.amount == b.amount && + a.enote_ephemeral_privkey == b.enote_ephemeral_privkey && a.partial_memo == b.partial_memo; +} +//------------------------------------------------------------------------------------------------------------------- +bool operator==(const JamtisPaymentProposalSelfSendV1 a, const JamtisPaymentProposalSelfSendV1 b) +{ + return a.destination == b.destination && a.amount == b.amount && a.type == b.type && + a.enote_ephemeral_privkey == b.enote_ephemeral_privkey && a.partial_memo == b.partial_memo; +} +//------------------------------------------------------------------------------------------------------------------- void get_enote_ephemeral_pubkey(const JamtisPaymentProposalV1 &proposal, crypto::x25519_pubkey &enote_ephemeral_pubkey_out) { diff --git a/src/seraphis_core/jamtis_payment_proposal.h b/src/seraphis_core/jamtis_payment_proposal.h index 6d737a1224f..06ea329aef7 100644 --- a/src/seraphis_core/jamtis_payment_proposal.h +++ b/src/seraphis_core/jamtis_payment_proposal.h @@ -91,6 +91,10 @@ struct JamtisPaymentProposalSelfSendV1 final TxExtra partial_memo; }; +/// equality operators +bool operator==(const JamtisPaymentProposalV1 a, const JamtisPaymentProposalV1 b); +bool operator==(const JamtisPaymentProposalSelfSendV1 a, const JamtisPaymentProposalSelfSendV1 b); + /** * brief: get_enote_ephemeral_pubkey - get the proposal's enote ephemeral pubkey xK_e * param: proposal -