mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04: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)
|
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 + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue