diff options
author | Kashif Smith <1489460+kashifs@users.noreply.github.com> | 2023-12-04 16:14:00 -0500 |
---|---|---|
committer | Kashif Smith <1489460+kashifs@users.noreply.github.com> | 2023-12-04 16:14:00 -0500 |
commit | c2b836b119eeed8727d73bcca5e95055eb93fb1a (patch) | |
tree | a3a5c1580d24c0cdb512558f6ce65ece41ee23d5 /src/bitcoin-tx.cpp | |
parent | 160d23677ad799cf9b493eaa923b2ac080c3fb8e (diff) | |
download | bitcoin-c2b836b119eeed8727d73bcca5e95055eb93fb1a.tar.xz |
bitcoin-tx: Make replaceable value optional
Diffstat (limited to 'src/bitcoin-tx.cpp')
-rw-r--r-- | src/bitcoin-tx.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index 8fe2881f6f..384db22119 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -223,8 +223,8 @@ static void MutateTxLocktime(CMutableTransaction& tx, const std::string& cmdVal) static void MutateTxRBFOptIn(CMutableTransaction& tx, const std::string& strInIdx) { // parse requested index - int64_t inIdx; - if (!ParseInt64(strInIdx, &inIdx) || inIdx < 0 || inIdx >= static_cast<int64_t>(tx.vin.size())) { + int64_t inIdx = -1; + if (strInIdx != "" && (!ParseInt64(strInIdx, &inIdx) || inIdx < 0 || inIdx >= static_cast<int64_t>(tx.vin.size()))) { throw std::runtime_error("Invalid TX input index '" + strInIdx + "'"); } |