MCPcopy Create free account
hub / github.com/ElementsProject/elements / TrimAndParse

Function TrimAndParse

src/bitcoin-tx.cpp:246–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244
245template <typename T>
246static T TrimAndParse(const std::string& int_str, const std::string& err)
247{
248 const auto parsed{ToIntegral<T>(TrimString(int_str))};
249 if (!parsed.has_value()) {
250 throw std::runtime_error(err + " '" + int_str + "'");
251 }
252 return parsed.value();
253}
254
255static void MutateTxAddInput(CMutableTransaction& tx, const std::string& strInput)
256{

Callers

nothing calls this directly

Calls 2

TrimStringFunction · 0.85
valueMethod · 0.45

Tested by

no test coverage detected