bitcoin-tx: Make replaceable value optional
This commit is contained in:
1 parent
160d23677a
commit
c2b836b119
1 file changed
+2
-2
+2
-2
@@ -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