No description provided.
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-
fanquake commented at 6:12 PM on December 1, 2026: member
- DrahtBot added the label RPC/REST/ZMQ on Dec 1, 2026
-
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
- Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/37033
- Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/37033.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/37033#author-ralph
<!--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><!--meta-tag:bot-skip--></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
-Wunusedby 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-->
-
nervana21 commented at 9:32 PM on December 1, 2026: contributor
ACK bf07fa3ea41595e8493e0ad70e5ae4bb31bc6c76
-
Conradgabe commented at 6:30 AM on December 2, 2026: contributor
ACK bf07fa3ea41595e8493e0ad70e5ae4bb31bc6c76
-
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.
maflcko commented at 7:40 AM on December 2, 2026: memberlgtm ACK bf07fa3ea41595e8493e0ad70e5ae4bb31bc6c76
rpc: remove duplicate avgfeerate key in getblockstats f41029ce2022d03bf4e6rpc: inline SetHasKeys as a lambda in getblockstats
Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>fanquake force-pushed on Dec 2, 2026maflcko commented at 11:12 AM on December 2, 2026: memberreview 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>
nervana21 commented at 4:15 PM on December 2, 2026: contributorACK 22d03bf4e6131eba4703e8c220a606d4775c0b06
fanquake merged this on Dec 3, 2026fanquake closed this on Dec 3, 2026fanquake deleted the branch on Dec 3, 2026ContributorsLabels
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
More mirrored repositories can be found on mirror.b10c.me