GetVirtualTransactionSize

Compute the virtual transaction size (weight reinterpreted as bytes).

Synopsis

Declared in <policy/policy.h>

int64_t
GetVirtualTransactionSize(
    int64_t nWeight,
    int64_t nSigOpCost,
    unsigned int bytes_per_sigop);

Return Value

Virtual transaction size in vB.

Parameters

NameDescription
nWeightTransaction weight.
nSigOpCostSignature operation cost of the transaction.
bytes_per_sigopBytes charged per signature operation.