Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use std::move when deleting CTransactions from CTxMempool #8099

Closed
sipa opened this issue May 25, 2016 · 1 comment
Closed

Use std::move when deleting CTransactions from CTxMempool #8099

sipa opened this issue May 25, 2016 · 1 comment

Comments

@sipa
Copy link
Member

sipa commented May 25, 2016

Currently, many CTxMempool::remove*() functions copy the transaction they delete to a std::list, and then erase the mempool entries. This copy + erase can be avoided by using c++11's std::move.

Practically, this would mean passing a std::list<CTransaction>& to all remove* functions, down to removeUnchecked, which would move the CTransactions being deleted to that list before calling the erase method on maptx.

@fanquake
Copy link
Member

fanquake commented Nov 7, 2016

Think this can be closed after #8515 ?

@sipa sipa closed this as completed Nov 7, 2016
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants