MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / ToDebugString

Method ToDebugString

src/entities/id.cpp:134–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132};
133
134string CUserID::ToDebugString() const {
135 return std::visit([&](auto&& idIn) -> string {
136 using ID = std::decay_t<decltype(idIn)>;
137 if constexpr (std::is_same_v<ID, CRegID>) {
138 return "R:" + idIn.ToString();
139 } else if constexpr (std::is_same_v<ID, CKeyID>) {
140 return "K:" + idIn.ToString() + ", addr=" + idIn.ToAddress();
141 } else if constexpr (std::is_same_v<ID, CPubKey>) {
142 return "P:" + idIn.ToString() + ", addr=" + idIn.GetKeyId().ToAddress();
143 } else { // CNullID
144 assert( (std::is_same_v<ID, CNullID>) );
145 return "Null";
146 }
147 }, uid);
148}
149
150shared_ptr<CUserID> CUserID::ParseUserId(const string &idStr) {
151 CRegID regId(idStr);

Callers 12

CheckAccountRegIdFunction · 0.80
getdexoperatorbyownerFunction · 0.80
ExGetAccountAssetFuncFunction · 0.80
OperateAccountMethod · 0.80
TransferAccountAssetMethod · 0.80
ExecuteTxMethod · 0.80
ToStringMethod · 0.80
ToStringMethod · 0.80
ToStringMethod · 0.80
ExecuteTxMethod · 0.80

Calls 3

ToAddressMethod · 0.80
ToStringMethod · 0.45
GetKeyIdMethod · 0.45

Tested by

no test coverage detected