wallet::CalculateMaximumSignedInputSize

CalculateMaximumSignedInputSize overloads

Synopses

Declared in <wallet/spend.h>

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(
    CTxOut const& txout,
    CWallet const* pwallet,
    CCoinControl const* coin_control);
» more...

Get the marginal bytes if spending the specified output, using an explicit signing provider.

int
CalculateMaximumSignedInputSize(
    CTxOut const& txout,
    COutPoint outpoint,
    SigningProvider const* pwallet,
    bool can_grind_r,
    CCoinControl const* coin_control);
» more...

Return Value

The marginal size in bytes of the signed input, or -1 on failure.

Parameters

NameDescription
txoutThe output that would be spent.
pwalletThe wallet that owns the output and provides signing information.
coin_controlCoin control settings used to decide whether to expect signature grinding.
outpointThe outpoint identifying the output being spent.
can_grind_rWhether low-R signature grinding may be assumed when sizing the input.