This commit modifies the GetCoin method in the CoinsViewBottom test class to not return spent coins. Previously, it would return any coin found in the map, regardless of whether it was spent or not. Now it checks the IsSpent() status before returning and only returns unspent coins, ensuring consistent behavior with other implementations of the CCoinsView interface.
coins: Fix GetCoin to not return spent coins in CoinsViewBottom #32231
pull VolodymyrBg wants to merge 1 commits into bitcoin:master from VolodymyrBg:bg changing 1 files +6 −2-
VolodymyrBg commented at 5:29 PM on April 7, 2025: none
-
DrahtBot commented at 5:29 PM on April 7, 2025: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32231.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers Concept NACK l0rinc If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
- DrahtBot added the label UTXO Db and Indexes on Apr 7, 2025
-
5c5817d149
coins: Fix GetCoin to not return spent coins in CoinsViewBottom
Update coinscache_sim.cpp coins: Fix GetCoin to not return spent coins in CoinsViewBottom
- VolodymyrBg force-pushed on Apr 7, 2025
-
l0rinc commented at 5:35 PM on April 7, 2025: contributor
NACK, you've only changed the fuzz test.
There's already an actual fix as well, see: https://github.com/bitcoin/bitcoin/pull/30673/files#diff-f0ed73d62dae6ca28ebd3045e5fc0d5d02eaaacadb4c2a292985a3fbd7e1c77cL54
- VolodymyrBg closed this on Apr 7, 2025
Contributors
Labels