mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-03 22:47:32 +01:00
bitcoin-tx: Make replaceable value optional
This commit is contained in:
parent
160d23677a
commit
c2b836b119
1 changed files with 2 additions and 2 deletions
|
@ -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 + "'");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue