aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/blockchain.cpp2
-rw-r--r--src/cryptonote_core/cryptonote_tx_utils.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 43216324f..db707bb65 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -5153,7 +5153,7 @@ bool Blockchain::prepare_handle_incoming_blocks(const std::vector<block_complete
if (m_cancel)
return false;
- for (const auto &tx_blob : entry.txs)
+ for (size_t i = 0; i < entry.txs.size(); ++i)
{
if (tx_index >= txes.size())
SCAN_TABLE_QUIT("tx_index is out of sync");
diff --git a/src/cryptonote_core/cryptonote_tx_utils.cpp b/src/cryptonote_core/cryptonote_tx_utils.cpp
index 7400c4328..f41c63a4b 100644
--- a/src/cryptonote_core/cryptonote_tx_utils.cpp
+++ b/src/cryptonote_core/cryptonote_tx_utils.cpp
@@ -622,8 +622,10 @@ namespace cryptonote
if (need_additional_txkeys)
{
additional_tx_keys.clear();
- for (const auto &d: destinations)
+ for (size_t i = 0; i < destinations.size(); ++i)
+ {
additional_tx_keys.push_back(keypair::generate(sender_account_keys.get_device()).sec);
+ }
}
bool r = construct_tx_with_tx_key(sender_account_keys, subaddresses, sources, destinations, change_addr, extra, tx, unlock_time, tx_key, additional_tx_keys, rct, rct_config, msout);