diff options
author | Andrew Chow <achow101-github@achow101.com> | 2022-07-08 10:16:45 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2022-07-08 10:27:06 -0400 |
commit | 194710d8ff398838e4e5bb87b56e19ebed1d6c52 (patch) | |
tree | 5278c6d93e70f7fc2b5e50908291aeecc3c9dc09 /src/wallet/wallet.h | |
parent | b9f9ed4640f8064a0606755cd1f16ad5dbb0ee06 (diff) | |
parent | d54c5c8b1b1a38b5b38e6878aea0fa8d6c1ad7e9 (diff) |
Merge bitcoin/bitcoin#25481: wallet: unify max signature logic
d54c5c8b1b1a38b5b38e6878aea0fa8d6c1ad7e9 wallet: use CCoinControl to estimate signature size (S3RK)
a94659c84ee10ac5915eb5a6b654435183d88521 wallet: replace GetTxSpendSize with CalculateMaximumSignedInputSize (S3RK)
Pull request description:
Currently `DummySignTx` and `DummySignInput` use different ways to determine signature size.
This PR unifies the way wallet estimates signature size for various inputs.
Instead of passing boolean flags from calling code the `use_max_sig` is now calculated at the place of signature creation using information available in `CCoinControl`
ACKs for top commit:
achow101:
ACK d54c5c8b1b1a38b5b38e6878aea0fa8d6c1ad7e9
theStack:
Code-review ACK d54c5c8b1b1a38b5b38e6878aea0fa8d6c1ad7e9
Tree-SHA512: e790903ad4683067070aa7dbf7434a1bd142282a5bc425112e64d88d27559f1a2cd60c68d6022feaf6b845237035cb18ece10f6243d719ba28173b69bd99110a
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r-- | src/wallet/wallet.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 6b12752c34..669aa8d195 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -955,7 +955,7 @@ bool AddWalletSetting(interfaces::Chain& chain, const std::string& wallet_name); //! Remove wallet name from persistent configuration so it will not be loaded on startup. bool RemoveWalletSetting(interfaces::Chain& chain, const std::string& wallet_name); -bool DummySignInput(const SigningProvider& provider, CTxIn &tx_in, const CTxOut &txout, bool use_max_sig); +bool DummySignInput(const SigningProvider& provider, CTxIn &tx_in, const CTxOut &txout, const CCoinControl* coin_control = nullptr); bool FillInputToWeight(CTxIn& txin, int64_t target_weight); } // namespace wallet |