aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-12-05 20:34:35 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-12-05 21:13:37 +0000
commit9cc68a2f74f5722c0c0e9854825bcc24f17f6187 (patch)
treee6e6b6abc0916b7bd3bf1df514d59521782c8920 /src/cryptonote_core
parentcryptonote: set tx hash on newly parsed txes when known (diff)
downloadmonero-9cc68a2f74f5722c0c0e9854825bcc24f17f6187.tar.xz
tx_pool: add a few std::move where it can make a difference
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/tx_pool.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp
index 120edd87b..16a86b19f 100644
--- a/src/cryptonote_core/tx_pool.cpp
+++ b/src/cryptonote_core/tx_pool.cpp
@@ -663,7 +663,8 @@ namespace cryptonote
// continue
return true;
}
- txs.push_back(tx);
+ tx.set_hash(txid);
+ txs.push_back(std::move(tx));
return true;
}, true, include_unrelayed_txes);
}
@@ -803,7 +804,7 @@ namespace cryptonote
txi.last_relayed_time = include_sensitive_data ? meta.last_relayed_time : 0;
txi.do_not_relay = meta.do_not_relay;
txi.double_spend_seen = meta.double_spend_seen;
- tx_infos.push_back(txi);
+ tx_infos.push_back(std::move(txi));
return true;
}, true, include_sensitive_data);
@@ -885,7 +886,7 @@ namespace cryptonote
}
const crypto::key_image& k_image = kee.first;
- key_image_infos[k_image] = tx_hashes;
+ key_image_infos[k_image] = std::move(tx_hashes);
}
return true;
}