You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(cache): migrate unordered_lru_cache::get to return std::optional
Change unordered_lru_cache::get() from returning bool with an output
parameter to returning std::optional<Value> by value. This provides a
more modern API that is easier to use and less error-prone.
- Add <optional> header to unordered_lru_cache.h
- Update get() signature: bool get(key, Value&) -> std::optional<Value> get(key)
- Update all 21 call sites across 11 files to use the new API
- Maintain same copy semantics for performance (no performance impact)
Files updated:
- src/unordered_lru_cache.h
- src/llmq/quorums.cpp (5 call sites)
- src/llmq/utils.cpp (2 call sites)
- src/llmq/snapshot.cpp, signing.cpp, dkgsessionmgr.cpp, blockprocessor.cpp
- src/instantsend/db.cpp (3 call sites)
- src/evo/mnhftx.cpp, creditpool.cpp, cbtx.cpp
- src/masternode/meta.cpp
0 commit comments