Closed melanke closed 2 years ago
Yeah that's odd. I swear that it was used in the past, but there seems to be some history missing on where it came from.
Anyway; here are the rules for transaction prioritisation (ref)
public int CompareTo(Transaction otherTx)
{
if (otherTx == null) return 1;
int ret = (Tx.GetAttribute<HighPriorityAttribute>() != null).CompareTo(otherTx.GetAttribute<HighPriorityAttribute>() != null);
if (ret != 0) return ret;
// Fees sorted ascending
ret = Tx.FeePerByte.CompareTo(otherTx.FeePerByte);
if (ret != 0) return ret;
ret = Tx.NetworkFee.CompareTo(otherTx.NetworkFee);
if (ret != 0) return ret;
// Transaction hash sorted descending
return otherTx.Hash.CompareTo(Tx.Hash);
}
So for implementing the feature; when . Then secondly we must increase prioritisationFee
is used we should at least also set the HighPriority
attribute. It has no cost but is the first thing checkednetworkFee
with the value of prioritisationFee
.
-edit- correction. the high HighPriority attribute can only be set on transactions signed by the committee. This TX is validated in the VerifyStateDependent()
routine in C#
completed in v5.2.0 release
https://github.com/CityOfZion/neon-js/blob/804b20a34872be3d6ae70bc036bdf367fc50b280/packages/neon-js/src/experimental/types.ts#L5