Skip to content

Commit c2b836b

Browse files
committed
bitcoin-tx: Make replaceable value optional
1 parent 160d236 commit c2b836b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bitcoin-tx.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ static void MutateTxLocktime(CMutableTransaction& tx, const std::string& cmdVal)
223223
static void MutateTxRBFOptIn(CMutableTransaction& tx, const std::string& strInIdx)
224224
{
225225
// parse requested index
226-
int64_t inIdx;
227-
if (!ParseInt64(strInIdx, &inIdx) || inIdx < 0 || inIdx >= static_cast<int64_t>(tx.vin.size())) {
226+
int64_t inIdx = -1;
227+
if (strInIdx != "" && (!ParseInt64(strInIdx, &inIdx) || inIdx < 0 || inIdx >= static_cast<int64_t>(tx.vin.size()))) {
228228
throw std::runtime_error("Invalid TX input index '" + strInIdx + "'");
229229
}
230230

0 commit comments

Comments
 (0)