mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-29 21:41:07 +02:00
bitcoin-tx: Make replaceable value optional
This commit is contained in:
@@ -223,8 +223,8 @@ static void MutateTxLocktime(CMutableTransaction& tx, const std::string& cmdVal)
|
|||||||
static void MutateTxRBFOptIn(CMutableTransaction& tx, const std::string& strInIdx)
|
static void MutateTxRBFOptIn(CMutableTransaction& tx, const std::string& strInIdx)
|
||||||
{
|
{
|
||||||
// parse requested index
|
// parse requested index
|
||||||
int64_t inIdx;
|
int64_t inIdx = -1;
|
||||||
if (!ParseInt64(strInIdx, &inIdx) || inIdx < 0 || inIdx >= static_cast<int64_t>(tx.vin.size())) {
|
if (strInIdx != "" && (!ParseInt64(strInIdx, &inIdx) || inIdx < 0 || inIdx >= static_cast<int64_t>(tx.vin.size()))) {
|
||||||
throw std::runtime_error("Invalid TX input index '" + strInIdx + "'");
|
throw std::runtime_error("Invalid TX input index '" + strInIdx + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user