Function NodeLedger.isAcceptableDoubleSpent

Checks whether the tx is an acceptable double spend transaction.

bool isAcceptableDoubleSpent (
  in ref const(Transaction) tx,
  ubyte threshold_pct
) @safe;

If tx is not a double spend transaction, then returns true. If tx is a double spend transaction, and its fee is considerable higher than the existing double spend transactions, then returns true. Otherwise this function returns false.

Parameters

NameDescription
tx transaction
threshold_pct percentage by which the fee of the new transaction has to be higher, than the previously highest double spend transaction

Returns

whether the tx is an acceptable double spend transaction