diff options
| author | Riccardo Spagni <ric@spagni.net> | 2015-08-24 19:20:10 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2015-08-24 19:20:12 +0200 |
| commit | 10f5e00b2197024eae2cde27ecb7f3e705e9e441 (patch) | |
| tree | ad354dd1a0f409e9acfa8959d4faa382d4f94bd1 /src/cryptonote_core | |
| parent | 776b4fc91a821be152f0f23e6873aabb78a72029 (diff) | |
| parent | 6c995710d8cdc8dbbb3da2d11dc8dfe335074ec9 (diff) | |
| download | monzero-core-10f5e00b2197024eae2cde27ecb7f3e705e9e441.tar.gz monzero-core-10f5e00b2197024eae2cde27ecb7f3e705e9e441.tar.xz monzero-core-10f5e00b2197024eae2cde27ecb7f3e705e9e441.zip | |
Merge pull request #380
6c99571 make tx keys available to the user (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core')
| -rw-r--r-- | src/cryptonote_core/cryptonote_format_utils.cpp | 3 | ||||
| -rw-r--r-- | src/cryptonote_core/cryptonote_format_utils.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/cryptonote_core/cryptonote_format_utils.cpp b/src/cryptonote_core/cryptonote_format_utils.cpp index af8e703bf..cac51c042 100644 --- a/src/cryptonote_core/cryptonote_format_utils.cpp +++ b/src/cryptonote_core/cryptonote_format_utils.cpp @@ -408,7 +408,7 @@ namespace cryptonote return encrypt_payment_id(payment_id, public_key, secret_key); } //--------------------------------------------------------------- - bool construct_tx(const account_keys& sender_account_keys, const std::vector<tx_source_entry>& sources, const std::vector<tx_destination_entry>& destinations, std::vector<uint8_t> extra, transaction& tx, uint64_t unlock_time) + bool construct_tx(const account_keys& sender_account_keys, const std::vector<tx_source_entry>& sources, const std::vector<tx_destination_entry>& destinations, std::vector<uint8_t> extra, transaction& tx, uint64_t unlock_time, crypto::secret_key &tx_key) { tx.vin.clear(); tx.vout.clear(); @@ -420,6 +420,7 @@ namespace cryptonote tx.extra = extra; keypair txkey = keypair::generate(); add_tx_pub_key_to_extra(tx, txkey.pub); + tx_key = txkey.sec; // if we have a stealth payment id, find it and encrypt it with the tx key now std::vector<tx_extra_field> tx_extra_fields; diff --git a/src/cryptonote_core/cryptonote_format_utils.h b/src/cryptonote_core/cryptonote_format_utils.h index 319205368..ddc0eadaa 100644 --- a/src/cryptonote_core/cryptonote_format_utils.h +++ b/src/cryptonote_core/cryptonote_format_utils.h @@ -69,7 +69,7 @@ namespace cryptonote }; //--------------------------------------------------------------- - bool construct_tx(const account_keys& sender_account_keys, const std::vector<tx_source_entry>& sources, const std::vector<tx_destination_entry>& destinations, std::vector<uint8_t> extra, transaction& tx, uint64_t unlock_time); + bool construct_tx(const account_keys& sender_account_keys, const std::vector<tx_source_entry>& sources, const std::vector<tx_destination_entry>& destinations, std::vector<uint8_t> extra, transaction& tx, uint64_t unlock_time, crypto::secret_key &txkey); template<typename T> bool find_tx_extra_field_by_type(const std::vector<tx_extra_field>& tx_extra_fields, T& field) |
