wallet::CalculateMaximumSignedTxSize

CalculateMaximumSignedTxSize overloads

Synopses

Declared in <wallet/spend.h>

Calculate the size of the transaction, looking up previous outputs from the wallet.

[[requires_capability(0x7f2e1e5eb5d0)]]
TxSize
CalculateMaximumSignedTxSize(
    CTransaction const& tx,
    CWallet const* wallet,
    CCoinControl const* coin_control = nullptr);
» more...

Calculate the size of the transaction using CoinControl to determine whether to expect signature grinding when calculating the size of the input spend.

TxSize
CalculateMaximumSignedTxSize(
    CTransaction const& tx,
    CWallet const* wallet,
    std::vector<CTxOut> const& txouts,
    CCoinControl const* coin_control = nullptr);
» more...

Return Value

The estimated virtual size and weight of the signed transaction.

Parameters

NameDescription
txThe transaction whose signed size is estimated.
walletThe wallet that owns the inputs and provides signing information.
coin_controlCoin control settings used to decide whether to expect signature grinding.
txoutsThe previous outputs spent by the transaction's inputs.