Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/rawtransaction.cpp
Show First 20 Lines • Show All 641 Lines • ▼ Show 20 Lines | static UniValue decoderawtransaction(const Config &config, | ||||
UniValue result(UniValue::VOBJ); | UniValue result(UniValue::VOBJ); | ||||
TxToUniv(CTransaction(std::move(mtx)), uint256(), result, false); | TxToUniv(CTransaction(std::move(mtx)), uint256(), result, false); | ||||
return result; | return result; | ||||
} | } | ||||
static std::string GetAllOutputTypes() { | static std::string GetAllOutputTypes() { | ||||
std::string ret; | std::vector<std::string> ret; | ||||
for (int i = TX_NONSTANDARD; i <= TX_NULL_DATA; ++i) { | using U = std::underlying_type<TxoutType>::type; | ||||
if (i != TX_NONSTANDARD) { | for (U i = (U)TxoutType::NONSTANDARD; i <= (U)TxoutType::NULL_DATA; ++i) { | ||||
ret += ", "; | ret.emplace_back(GetTxnOutputType(static_cast<TxoutType>(i))); | ||||
} | } | ||||
ret += GetTxnOutputType(static_cast<txnouttype>(i)); | return Join(ret, ", "); | ||||
} | |||||
return ret; | |||||
} | } | ||||
static UniValue decodescript(const Config &config, | static UniValue decodescript(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
"decodescript", | "decodescript", | ||||
"Decode a hex-encoded script.\n", | "Decode a hex-encoded script.\n", | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 1,515 Lines • Show Last 20 Lines |