[#wallet-CalculateMaximumSignedInputSize-0c]
= xref:wallet.adoc[wallet]::CalculateMaximumSignedInputSize
:relfileprefix: ../
:mrdocs:

Get the marginal bytes if spending the specified output from this transaction&period; Use CoinControl to determine whether to expect signature grinding when calculating the size of the input spend&period;

== Synopsis

Declared in `&lt;wallet&sol;spend&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
CalculateMaximumSignedInputSize(
    xref:CTxOut.adoc[CTxOut] const& txout,
    xref:wallet/CWallet.adoc[CWallet] const* pwallet,
    xref:wallet/CCoinControl.adoc[CCoinControl] const* coin&lowbar;control);
----

== Return Value

The marginal size in bytes of the signed input, or &hyphen;1 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *txout*
| The output that would be spent&period;
| *pwallet*
| The wallet that owns the output and provides signing information&period;
| *coin&lowbar;control*
| Coin control settings used to decide whether to expect signature grinding&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
