Function FeeManager.getTxFeeRate

Calculate the transaction fee rate.

string getTxFeeRate (
  in ref const(Transaction) tx,
  scope nothrow @safe bool delegate(in ref geod24.bitblob.BitBlob!(64L), out UTXO) peekUTXO,
  scope nothrow @safe Amount delegate(geod24.bitblob.BitBlob!(64L)) getPenaltyDeposit,
  out Amount rate
) nothrow @safe;

This calculates the fee rate of the transaction, and can be used to compare two transactions for inclusion in a block / pool eviction. If the fee is not an exact multiplicator of the tx size, the remainder will be ignored.

Parameters

NameDescription
tx transaction for which we want to calculate the fee rate
peekUTXO UTXO finder (with or without replay protection)
rate The effective fee rate of this transaction

Returns

string describing the error, if an error happened, null otherwise