diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-09-14 20:22:16 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-09-14 20:22:16 +0100 |
commit | 0ce79ef10e19fac8068a20f76625b1fd007d163e (patch) | |
tree | e6dec1b586222e6c758a2b4b998c42119e0c5d7b /src | |
parent | Merge pull request #1053 (diff) | |
download | monero-0ce79ef10e19fac8068a20f76625b1fd007d163e.tar.xz |
core: cleanup some typecasting
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_core/cryptonote_format_utils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cryptonote_core/cryptonote_format_utils.cpp b/src/cryptonote_core/cryptonote_format_utils.cpp index 32b96f1fc..44f9380b0 100644 --- a/src/cryptonote_core/cryptonote_format_utils.cpp +++ b/src/cryptonote_core/cryptonote_format_utils.cpp @@ -471,7 +471,7 @@ namespace cryptonote //--------------------------------------------------------------- bool construct_tx_and_get_tx_key(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, bool rct) { - std::vector<crypto::secret_key> amount_keys; + std::vector<rct::key> amount_keys; tx.vin.clear(); tx.vout.clear(); tx.signatures.clear(); @@ -593,7 +593,7 @@ namespace cryptonote { crypto::secret_key scalar1; crypto::derivation_to_scalar(derivation, output_index, scalar1); - amount_keys.push_back(scalar1); + amount_keys.push_back(rct::sk2rct(scalar1)); } r = crypto::derive_public_key(derivation, output_index, dst_entr.addr.m_spend_public_key, out_eph_public_key); CHECK_AND_ASSERT_MES(r, false, "at creation outs: failed to derive_public_key(" << derivation << ", " << output_index << ", "<< dst_entr.addr.m_spend_public_key << ")"); @@ -750,9 +750,9 @@ namespace cryptonote get_transaction_prefix_hash(tx, tx_prefix_hash); rct::ctkeyV outSk; if (use_simple_rct) - tx.rct_signatures = rct::genRctSimple(rct::hash2rct(tx_prefix_hash), inSk, destinations, inamounts, outamounts, amount_in - amount_out, mixRing, (const rct::keyV&)amount_keys, index, outSk); + tx.rct_signatures = rct::genRctSimple(rct::hash2rct(tx_prefix_hash), inSk, destinations, inamounts, outamounts, amount_in - amount_out, mixRing, amount_keys, index, outSk); else - tx.rct_signatures = rct::genRct(rct::hash2rct(tx_prefix_hash), inSk, destinations, outamounts, mixRing, (const rct::keyV&)amount_keys, sources[0].real_output, outSk); // same index assumption + tx.rct_signatures = rct::genRct(rct::hash2rct(tx_prefix_hash), inSk, destinations, outamounts, mixRing, amount_keys, sources[0].real_output, outSk); // same index assumption CHECK_AND_ASSERT_MES(tx.vout.size() == outSk.size(), false, "outSk size does not match vout"); |