diff options
author | Tadeas Moravec <moravec.tadeas@gmail.com> | 2020-01-09 10:01:56 +0100 |
---|---|---|
committer | Tadeas Moravec <tadeas@moravec.xyz> | 2020-01-11 11:48:27 +0100 |
commit | 096a9dbdf958d23f74d132247143b8b8d3cb6dcd (patch) | |
tree | 7d285dcc389ee70c070f29f1c1e4111989abca8b /src/wallet/wallet2.h | |
parent | Merge pull request #6253 (diff) | |
download | monero-096a9dbdf958d23f74d132247143b8b8d3cb6dcd.tar.xz |
Wallet: Distingush amounts for a single subaddress
Adding a new `amounts` field ot the output of `get_transfers` RPC
method. This field specifies individual payments made to a single
subaddress in a single transaction, e.g., made by this command:
transfer <addr1> <amount1> <addr1> <amount2>
Diffstat (limited to 'src/wallet/wallet2.h')
-rw-r--r-- | src/wallet/wallet2.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index b6f72c7e1..f643c0d1a 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -360,10 +360,12 @@ private: END_SERIALIZE() }; + typedef std::vector<uint64_t> amounts_container; struct payment_details { crypto::hash m_tx_hash; uint64_t m_amount; + amounts_container m_amounts; uint64_t m_fee; uint64_t m_block_height; uint64_t m_unlock_time; @@ -1628,7 +1630,7 @@ BOOST_CLASS_VERSION(tools::wallet2::transfer_details, 12) BOOST_CLASS_VERSION(tools::wallet2::multisig_info, 1) BOOST_CLASS_VERSION(tools::wallet2::multisig_info::LR, 0) BOOST_CLASS_VERSION(tools::wallet2::multisig_tx_set, 1) -BOOST_CLASS_VERSION(tools::wallet2::payment_details, 4) +BOOST_CLASS_VERSION(tools::wallet2::payment_details, 5) BOOST_CLASS_VERSION(tools::wallet2::pool_payment_details, 1) BOOST_CLASS_VERSION(tools::wallet2::unconfirmed_transfer_details, 8) BOOST_CLASS_VERSION(tools::wallet2::confirmed_transfer_details, 6) @@ -1939,6 +1941,9 @@ namespace boost return; } a & x.m_coinbase; + if (ver < 5) + return; + a & x.m_amounts; } template <class Archive> |