Function NodeLedger.acceptTransaction

Called when a new transaction is received.

string acceptTransaction (
  in ref const(Transaction) tx,
  in const(ubyte) double_spent_threshold_pct = cast(ubyte)0u,
  in const(ushort) min_fee_pct = cast(ushort)0u
) @safe;

If the transaction is accepted it will be added to the transaction pool.

If the transaction is invalid, it's rejected and false is returned.

Parameters

NameDescription
tx the received transaction
double_spent_threshold_pct See Config.node.double_spent_threshold_pct
min_fee_pct See Config.node.min_fee_pct

Returns

reason why invalid or null if the transaction is valid and was added to the pool