Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoin-tx.cpp
Show First 20 Lines • Show All 513 Lines • ▼ Show 20 Lines | for (unsigned int i = 0; i < N_SIGHASH_OPTS; i++) { | ||||
sigHashType = SigHashType(sigHashOptions[i].flags); | sigHashType = SigHashType(sigHashOptions[i].flags); | ||||
return true; | return true; | ||||
} | } | ||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
uint256 ParseHashUO(std::map<std::string, UniValue> &o, std::string strKey) { | |||||
if (!o.count(strKey)) { | |||||
return uint256(); | |||||
} | |||||
return ParseHashUV(o[strKey], strKey); | |||||
} | |||||
std::vector<uint8_t> ParseHexUO(std::map<std::string, UniValue> &o, | |||||
std::string strKey) { | |||||
if (!o.count(strKey)) { | |||||
std::vector<uint8_t> emptyVec; | |||||
return emptyVec; | |||||
} | |||||
return ParseHexUV(o[strKey], strKey); | |||||
} | |||||
static Amount AmountFromValue(const UniValue &value) { | static Amount AmountFromValue(const UniValue &value) { | ||||
if (!value.isNum() && !value.isStr()) { | if (!value.isNum() && !value.isStr()) { | ||||
throw std::runtime_error("Amount is not a number or string"); | throw std::runtime_error("Amount is not a number or string"); | ||||
} | } | ||||
int64_t n; | int64_t n; | ||||
if (!ParseFixedPoint(value.getValStr(), 8, &n)) { | if (!ParseFixedPoint(value.getValStr(), 8, &n)) { | ||||
throw std::runtime_error("Invalid amount"); | throw std::runtime_error("Invalid amount"); | ||||
▲ Show 20 Lines • Show All 357 Lines • Show Last 20 Lines |