| 700 | } |
| 701 | |
| 702 | QString ConnectionTypeToQString(ConnectionType conn_type, bool prepend_direction) |
| 703 | { |
| 704 | QString prefix; |
| 705 | if (prepend_direction) { |
| 706 | prefix = (conn_type == ConnectionType::INBOUND) ? |
| 707 | /*: An inbound connection from a peer. An inbound connection |
| 708 | is a connection initiated by a peer. */ |
| 709 | QObject::tr("Inbound") : |
| 710 | /*: An outbound connection to a peer. An outbound connection |
| 711 | is a connection initiated by us. */ |
| 712 | QObject::tr("Outbound") + " "; |
| 713 | } |
| 714 | switch (conn_type) { |
| 715 | case ConnectionType::INBOUND: return prefix; |
| 716 | //: Peer connection type that relays all network information. |
| 717 | case ConnectionType::OUTBOUND_FULL_RELAY: return prefix + QObject::tr("Full Relay"); |
| 718 | /*: Peer connection type that relays network information about |
| 719 | blocks and not transactions or addresses. */ |
| 720 | case ConnectionType::BLOCK_RELAY: return prefix + QObject::tr("Block Relay"); |
| 721 | //: Peer connection type established manually through one of several methods. |
| 722 | case ConnectionType::MANUAL: return prefix + QObject::tr("Manual"); |
| 723 | //: Short-lived peer connection type that tests the aliveness of known addresses. |
| 724 | case ConnectionType::FEELER: return prefix + QObject::tr("Feeler"); |
| 725 | //: Short-lived peer connection type that solicits known addresses from a peer. |
| 726 | case ConnectionType::ADDR_FETCH: return prefix + QObject::tr("Address Fetch"); |
| 727 | } // no default case, so the compiler can warn about missing cases |
| 728 | assert(false); |
| 729 | } |
| 730 | |
| 731 | QString formatAssetAmount(const CAsset& asset, const CAmount& amount, const int bitcoin_unit, BitcoinUnits::SeparatorStyle separators, bool include_asset_name) |
| 732 | { |
no outgoing calls
no test coverage detected