rpc: remove duplicate `avgfeerate` key in `getblockstats` #37033

pull fanquake wants to merge 2 commits into bitcoin:master from fanquake:getblockstats_dup_avgfeerate changing 1 files +8 −12
  1. fanquake commented at 6:12 PM on December 1, 2026: member

    No description provided.

  2. DrahtBot added the label RPC/REST/ZMQ on Dec 1, 2026
  3. DrahtBot commented at 6:12 PM on December 1, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK maflcko, nervana21
    Stale ACK Conradgabe

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #36167 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36167.svg"></sub> (build: Enable -Wunused by fanquake)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. nervana21 commented at 9:32 PM on December 1, 2026: contributor

    ACK bf07fa3ea41595e8493e0ad70e5ae4bb31bc6c76

  5. Conradgabe commented at 6:30 AM on December 2, 2026: contributor

    ACK bf07fa3ea41595e8493e0ad70e5ae4bb31bc6c76

  6. in src/rpc/blockchain.cpp:2080 in bf07fa3ea4


    maflcko commented at 7:38 AM on December 2, 2026:

    nit: While touching, you could also inline as a lambda:

    diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
    index e3b72dc..7530588 100644
    --- a/src/rpc/blockchain.cpp
    +++ b/src/rpc/blockchain.cpp
    @@ -1979,10 +1979,2 @@ void CalculatePercentilesByWeight(CAmount result[NUM_GETBLOCKSTATS_PERCENTILES],
     
    -template<typename T>
    -static inline bool SetHasKeys(const std::set<T>& set) {return false;}
    -template<typename T, typename Tk, typename... Args>
    -static inline bool SetHasKeys(const std::set<T>& set, const Tk& key, const Args&... args)
    -{
    -    return (set.contains(key)) || SetHasKeys(set, args...);
    -}
    -
     // outpoint (needed for the utxo index) + nHeight|fCoinBase
    @@ -2071,2 +2063,6 @@ static RPCMethod getblockstats()
     
    +    const auto has_any_stat = [&stats](const auto&... keys) {
    +        return (stats.contains(keys) || ...);
    +    };
    +
         const CBlock& block = GetBlockChecked(chainman.m_blockman, pindex);
    

    (etc)


    fanquake commented at 10:54 AM on December 2, 2026:

    Thanks. Added a commit.

  7. maflcko commented at 7:40 AM on December 2, 2026: member

    lgtm ACK bf07fa3ea41595e8493e0ad70e5ae4bb31bc6c76

  8. rpc: remove duplicate avgfeerate key in getblockstats f41029ce20
  9. rpc: inline SetHasKeys as a lambda in getblockstats
    Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
    22d03bf4e6
  10. fanquake force-pushed on Dec 2, 2026
  11. maflcko commented at 11:12 AM on December 2, 2026: member

    review ACK 22d03bf4e6131eba4703e8c220a606d4775c0b06 📻

    <details><summary>Show signature</summary>

    Signature:

    untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
    RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
    trusted comment: review ACK 22d03bf4e6131eba4703e8c220a606d4775c0b06 📻
    Agsxae0ngR9E3wSGKzCtWmIIQFBNiF8fkU99s6cg4gA1b26it0i8SZ4mGGuMBGkcQcBgr2xAm8Fm8Ost0V84DQ==
    

    </details>

  12. nervana21 commented at 4:15 PM on December 2, 2026: contributor

    ACK 22d03bf4e6131eba4703e8c220a606d4775c0b06

  13. fanquake merged this on Dec 3, 2026
  14. fanquake closed this on Dec 3, 2026

  15. fanquake deleted the branch on Dec 3, 2026

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-12-05 03:51 UTC

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