HomePhabricator

Reduce cache lookups in CCoinsViewCache::FetchCoin

Description

Reduce cache lookups in CCoinsViewCache::FetchCoin

Summary:
Enhanced efficiency and readability of CCoinsViewCache::FetchCoin by replacing separate find() and emplace() calls with a single try_emplace(), reducing map lookups and potential insertions.
This is a backport of core#30326

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D19004

Details

Provenance
Lőrinc <pap.lorinc@gmail.com>Authored on Jun 23 2024, 21:56
PiRKCommitted on Fri, Nov 28, 16:47
PiRKPushed on Fri, Nov 28, 16:47
Reviewer
Restricted Project
Differential Revision
D19004: Reduce cache lookups in CCoinsViewCache::FetchCoin
Parents
rABC317043f74951: [electrum] fix context menu in Contacts tab
Branches
Unknown
Tags
Unknown