Skip to content

refactor: Rename local variable to distinguish it from type alias - #26624

Merged
glozow merged 1 commit into
bitcoin:masterfrom
hebasto:221202-name
Dec 5, 2022
Merged

refactor: Rename local variable to distinguish it from type alias#26624
glozow merged 1 commit into
bitcoin:masterfrom
hebasto:221202-name

Conversation

@hebasto

@hebasto hebasto commented Dec 2, 2022

Copy link
Copy Markdown
Member

The txiter type alias is declared in the txmempool.h:

using txiter = indexed_transaction_set::nth_index<0>::type::const_iterator;

The `txiter` type alias is declared in the `txmempool.h`.
@DrahtBot

DrahtBot commented Dec 2, 2022

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK stickies-v, vasild, jarolrod

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@stickies-v stickies-v left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 1984db1

Straightforward change, better to not have naming conflicts.

Comment thread src/net_processing.cpp
Comment on lines +2294 to +2296
auto tx_iter = m_mempool.GetIter(tx->GetHash());
if (tx_iter) {
const CTxMemPoolEntry::Parents& parents = (*tx_iter)->GetMemPoolParentsConst();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, while touching:

Suggested change
auto tx_iter = m_mempool.GetIter(tx->GetHash());
if (tx_iter) {
const CTxMemPoolEntry::Parents& parents = (*tx_iter)->GetMemPoolParentsConst();
auto tx_iter{m_mempool.GetIter(tx->GetHash())};
if (tx_iter) {
const CTxMemPoolEntry::Parents& parents{(*tx_iter)->GetMemPoolParentsConst()};

@vasild vasild left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 1984db1

@jarolrod jarolrod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 1984db1

I have reviewed the code and agree it can be merged.

@glozow
glozow merged commit 8b79686 into bitcoin:master Dec 5, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Dec 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants