diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2020-04-22 16:48:37 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2020-04-22 16:50:20 +0000 |
commit | 2efbd5f0ccc196043a17b1d9d6110dccdc7fa40e (patch) | |
tree | 638627d711ab109bed231a5407311702b40c61b8 /src/cryptonote_core | |
parent | Merge pull request #6314 (diff) | |
download | monero-2efbd5f0ccc196043a17b1d9d6110dccdc7fa40e.tar.xz |
cryptonote: fix reuse of non default tx data when relaying
An automatic tx variable is initialized properly on the first
run through the loop, but not the second. Moving the variable
inside the loop ensures the ctor is called again to init it.
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 10bbff457..22861b974 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -1308,9 +1308,9 @@ namespace cryptonote std::vector<crypto::hash> tx_hashes{}; tx_hashes.resize(tx_blobs.size()); - cryptonote::transaction tx{}; for (std::size_t i = 0; i < tx_blobs.size(); ++i) { + cryptonote::transaction tx{}; if (!parse_and_validate_tx_from_blob(tx_blobs[i], tx, tx_hashes[i])) { LOG_ERROR("Failed to parse relayed transaction"); |