Page MenuHomePhabricator

Add a Currency::getTicker() shortcut
ClosedPublic

Authored by Fabien on Wed, Aug 5, 19:38.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABC6bfc68020f14: Add a Currency::getTicker() shortcut
Summary

Instead of get()'ing the currency then accessing the ticker member. This makes it possible to hide the underlying type and store a string_view so we can use a constexpr constructor for Currency. With SSO the performance impact is negligible.

Test Plan
ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Build Bitcoin ABC Diffs / Diff Testing (ai-review) passed.
CodeRabbit Review

Diff : committed changes only
Compare : HEAD → master
Directory : work
────────────────────────────────────────

(\(\
(• .•) Goodbye, 3-hour code review sessions.

────────────────────────────────────────
Review complete
No findings ✔

15 files reviewed:

  • src/consensus/amount.cpp
  • src/consensus/amount.h
  • src/feerate.cpp
  • src/init.cpp
  • src/qt/test/wallettests.cpp
  • src/rpc/avalanche.cpp
  • src/rpc/blockchain.cpp
  • src/rpc/mempool.cpp
  • src/rpc/misc.cpp
  • src/rpc/net.cpp

... and 5 more files
────────────────────────────────────────

This revision is now accepted and ready to land.Thu, Aug 6, 11:20
This revision was automatically updated to reflect the committed changes.