Skip to content

Commit 6a2e6b0

Browse files
committed
Remove out of date comments for CalculateMaximumSignedTxSize
1 parent ae69436 commit 6a2e6b0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/wallet/wallet.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,11 +1444,9 @@ bool CWallet::ImportScriptPubKeys(const std::string& label, const std::set<CScri
14441444
int64_t CalculateMaximumSignedTxSize(const CTransaction &tx, const CWallet *wallet, bool use_max_sig)
14451445
{
14461446
std::vector<CTxOut> txouts;
1447-
// Look up the inputs. We should have already checked that this transaction
1448-
// IsAllFromMe(ISMINE_SPENDABLE), so every input should already be in our
1449-
// wallet, with a valid index into the vout array, and the ability to sign.
14501447
for (const CTxIn& input : tx.vin) {
14511448
const auto mi = wallet->mapWallet.find(input.prevout.hash);
1449+
// Can not estimate size without knowing the input details
14521450
if (mi == wallet->mapWallet.end()) {
14531451
return -1;
14541452
}
@@ -1463,8 +1461,6 @@ int64_t CalculateMaximumSignedTxSize(const CTransaction &tx, const CWallet *wall
14631461
{
14641462
CMutableTransaction txNew(tx);
14651463
if (!wallet->DummySignTx(txNew, txouts, use_max_sig)) {
1466-
// This should never happen, because IsAllFromMe(ISMINE_SPENDABLE)
1467-
// implies that we can sign for every input.
14681464
return -1;
14691465
}
14701466
return GetVirtualTransactionSize(CTransaction(txNew));

0 commit comments

Comments
 (0)