diff options
| author | Gregory Sanders <[email protected]> | 2019-11-21 14:37:26 -0500 |
|---|---|---|
| committer | Gregory Sanders <[email protected]> | 2019-11-21 14:37:26 -0500 |
| commit | 6a2e6b0600077e5903400dc74bc8b0c26592fde6 (patch) | |
| tree | 1991ef56619107f3d56a27edbc0f51d3ac0a242d | |
| parent | Merge #17407: node: Add reference to mempool in NodeContext (diff) | |
| download | discoin-6a2e6b0600077e5903400dc74bc8b0c26592fde6.tar.xz discoin-6a2e6b0600077e5903400dc74bc8b0c26592fde6.zip | |
Remove out of date comments for CalculateMaximumSignedTxSize
| -rw-r--r-- | src/wallet/wallet.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index ff182c847..dc2a52d49 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1444,11 +1444,9 @@ bool CWallet::ImportScriptPubKeys(const std::string& label, const std::set<CScri int64_t CalculateMaximumSignedTxSize(const CTransaction &tx, const CWallet *wallet, bool use_max_sig) { std::vector<CTxOut> txouts; - // Look up the inputs. We should have already checked that this transaction - // IsAllFromMe(ISMINE_SPENDABLE), so every input should already be in our - // wallet, with a valid index into the vout array, and the ability to sign. for (const CTxIn& input : tx.vin) { const auto mi = wallet->mapWallet.find(input.prevout.hash); + // Can not estimate size without knowing the input details if (mi == wallet->mapWallet.end()) { return -1; } @@ -1463,8 +1461,6 @@ int64_t CalculateMaximumSignedTxSize(const CTransaction &tx, const CWallet *wall { CMutableTransaction txNew(tx); if (!wallet->DummySignTx(txNew, txouts, use_max_sig)) { - // This should never happen, because IsAllFromMe(ISMINE_SPENDABLE) - // implies that we can sign for every input. return -1; } return GetVirtualTransactionSize(CTransaction(txNew)); |