MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetWarningsForRpc

Function GetWarningsForRpc

src/node/warnings.cpp:54–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54UniValue GetWarningsForRpc(const Warnings& warnings, bool use_deprecated)
55{
56 if (use_deprecated) {
57 const auto all_messages{warnings.GetMessages()};
58 return all_messages.empty() ? "" : all_messages.back().original;
59 }
60
61 UniValue messages{UniValue::VARR};
62 for (auto&& message : warnings.GetMessages()) {
63 messages.push_back(std::move(message.original));
64 }
65 return messages;
66}
67} // namespace node

Callers 3

getmininginfoFunction · 0.85
getblockchaininfoFunction · 0.85
getnetworkinfoFunction · 0.85

Calls 4

GetMessagesMethod · 0.80
emptyMethod · 0.45
backMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected