mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-20 14:05:23 +01:00
Remove out of date comments for CalculateMaximumSignedTxSize
This commit is contained in:
parent
ae6943620a
commit
6a2e6b0600
1 changed files with 1 additions and 5 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue