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

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:221202-name changing 1 files +3 −3
  1. hebasto commented at 11:27 AM on December 2, 2022: member
  2. refactor: Rename local variable to distinguish it from type alias
    The `txiter` type alias is declared in the `txmempool.h`.
    1984db1d50
  3. DrahtBot commented at 11:27 AM on December 2, 2022: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    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.

  4. DrahtBot added the label Refactoring on Dec 2, 2022
  5. in src/net_processing.cpp:2296 in 1984db1d50
    2290 | @@ -2291,9 +2291,9 @@ void PeerManagerImpl::ProcessGetData(CNode& pfrom, Peer& peer, const std::atomic
    2291 |              std::vector<uint256> parent_ids_to_add;
    2292 |              {
    2293 |                  LOCK(m_mempool.cs);
    2294 | -                auto txiter = m_mempool.GetIter(tx->GetHash());
    2295 | -                if (txiter) {
    2296 | -                    const CTxMemPoolEntry::Parents& parents = (*txiter)->GetMemPoolParentsConst();
    2297 | +                auto tx_iter = m_mempool.GetIter(tx->GetHash());
    2298 | +                if (tx_iter) {
    2299 | +                    const CTxMemPoolEntry::Parents& parents = (*tx_iter)->GetMemPoolParentsConst();
    


    stickies-v commented at 12:31 PM on December 2, 2022:

    nit, while touching:

                    auto tx_iter{m_mempool.GetIter(tx->GetHash())};
                    if (tx_iter) {
                        const CTxMemPoolEntry::Parents& parents{(*tx_iter)->GetMemPoolParentsConst()};
    
  6. stickies-v approved
  7. stickies-v commented at 12:32 PM on December 2, 2022: contributor

    ACK 1984db1d5

    Straightforward change, better to not have naming conflicts.

  8. vasild approved
  9. vasild commented at 1:03 PM on December 2, 2022: contributor

    ACK 1984db1d5037646d7ded23d9f26a42524b7e3519

  10. jarolrod commented at 4:36 AM on December 4, 2022: member

    ACK 1984db1d5037646d7ded23d9f26a42524b7e3519

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

  11. glozow merged this on Dec 5, 2022
  12. glozow closed this on Dec 5, 2022

  13. sidhujag referenced this in commit 4275677c89 on Dec 5, 2022
  14. bitcoin locked this on Dec 5, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me