diff options
author | Sjors Provoost <sjors@sprovoost.nl> | 2023-02-23 18:30:12 +0100 |
---|---|---|
committer | Sjors Provoost <sjors@sprovoost.nl> | 2023-02-23 18:30:12 +0100 |
commit | 807de2cebdad960c2b52185528ca8960ec694f49 (patch) | |
tree | 3d4c81ef3f7681a1107b495eaa581c7a7679915a /src/wallet/spend.h | |
parent | 72b763e4521e674990da5dd1999b7a8c7bd3ba8c (diff) |
wallet: skip R-value grinding for external signers
When producing a dummy signature for the purpose of estimating the transaction fee, do not assume an external signer performs R-value grinding on the signature.
In particular, this avoids a scenario where the fee rate is 1 sat / vbyte and a transaction with a 72 byte signature is not accepted into our mempool.
This commit also drops the nullptr default for CCoinControl arguments for functions that it touches. This is because having a boolean argument right next to an optional pointer is error prone.
Co-Authored-By: S3RK <1466284+S3RK@users.noreply.github.com>
Diffstat (limited to 'src/wallet/spend.h')
-rw-r--r-- | src/wallet/spend.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/spend.h b/src/wallet/spend.h index d8da556d29..ad122b7ef3 100644 --- a/src/wallet/spend.h +++ b/src/wallet/spend.h @@ -17,8 +17,8 @@ namespace wallet { /** Get the marginal bytes if spending the specified output from this transaction. * Use CoinControl to determine whether to expect signature grinding when calculating the size of the input spend. */ -int CalculateMaximumSignedInputSize(const CTxOut& txout, const CWallet* pwallet, const CCoinControl* coin_control = nullptr); -int CalculateMaximumSignedInputSize(const CTxOut& txout, const COutPoint outpoint, const SigningProvider* pwallet, const CCoinControl* coin_control = nullptr); +int CalculateMaximumSignedInputSize(const CTxOut& txout, const CWallet* pwallet, const CCoinControl* coin_control); +int CalculateMaximumSignedInputSize(const CTxOut& txout, const COutPoint outpoint, const SigningProvider* pwallet, bool can_grind_r, const CCoinControl* coin_control); struct TxSize { int64_t vsize{-1}; int64_t weight{-1}; |