CMutableTransaction

A mutable version of CTransaction.

Synopsis

Declared in <primitives/transaction.h>

struct CMutableTransaction;

Member Functions

NameDescription
CMutableTransaction [constructor]Constructors
GetHash Compute the hash of this CMutableTransaction. This is computed on the fly, as opposed to GetHash() in CTransaction, which uses a cached result.
HasWitness Returns true when any input carries witness data.
Serialize Serializes the transaction using the stream's transaction parameters.
Unserialize Unserializes the transaction using the stream's transaction parameters.

Data Members

NameDescription
nLockTime Lock time before which the transaction is not valid.
version Transaction version number.
vin Inputs spent by this transaction.
vout Outputs created by this transaction.

Non-Member Functions

NameDescription
AddInputsNormalize univalue-represented inputs and add them to the transaction
AddOutputsNormalize, parse, and add outputs to the transaction
ConstructTransactionCreate a transaction from univalue parameters
DataFromTransactionExtract signature data from a transaction input, and insert it.
DecodeHexTxDecode a hex-encoded serialized transaction.
SignTransactionSign the CMutableTransaction
SignTransactionSign a transaction with the given keystore and previous transactions
SignTransactionResultToJSONEncode the outcome of a signing attempt as a JSON object
wallet::DiscourageFeeSnipingSet a height-based locktime for new transactions (uses the height of the current chain tip unless we are not synced with the current chain