Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcdump.cpp
Show First 20 Lines • Show All 879 Lines • ▼ Show 20 Lines | try { | ||||
// Optional fields. | // Optional fields. | ||||
const std::string &strRedeemScript = | const std::string &strRedeemScript = | ||||
data.exists("redeemscript") ? data["redeemscript"].get_str() : ""; | data.exists("redeemscript") ? data["redeemscript"].get_str() : ""; | ||||
const UniValue &pubKeys = | const UniValue &pubKeys = | ||||
data.exists("pubkeys") ? data["pubkeys"].get_array() : UniValue(); | data.exists("pubkeys") ? data["pubkeys"].get_array() : UniValue(); | ||||
const UniValue &keys = | const UniValue &keys = | ||||
data.exists("keys") ? data["keys"].get_array() : UniValue(); | data.exists("keys") ? data["keys"].get_array() : UniValue(); | ||||
const bool &internal = | const bool internal = | ||||
data.exists("internal") ? data["internal"].get_bool() : false; | data.exists("internal") ? data["internal"].get_bool() : false; | ||||
const bool &watchOnly = | const bool watchOnly = | ||||
data.exists("watchonly") ? data["watchonly"].get_bool() : false; | data.exists("watchonly") ? data["watchonly"].get_bool() : false; | ||||
const std::string &label = | const std::string &label = | ||||
data.exists("label") && !internal ? data["label"].get_str() : ""; | data.exists("label") && !internal ? data["label"].get_str() : ""; | ||||
bool isScript = scriptPubKey.getType() == UniValue::VSTR; | bool isScript = scriptPubKey.getType() == UniValue::VSTR; | ||||
bool isP2SH = strRedeemScript.length() > 0; | bool isP2SH = strRedeemScript.length() > 0; | ||||
const std::string &output = isScript | const std::string &output = isScript | ||||
? scriptPubKey.get_str() | ? scriptPubKey.get_str() | ||||
▲ Show 20 Lines • Show All 534 Lines • Show Last 20 Lines |