priority_check

@extendable function priority_check(tx_body: gtx_transaction_body, tx_size: integer, tx_enter_timestamp: integer, current_timestamp: integer, compound_ops: set<text>?): priority_state_v1?(source)

Extend to support transaction priority. It will be called for every transaction, and can either return a priority_state_v1 or null to use the default value from no_op_priority_state(). If function throws, the transaction will be rejected.

This function is called for both v1 and v2 of the transaction priority implementation.

Parameters

tx_body

the transaction

tx_size

size of the transaction in bytes

tx_enter_timestamp

when the transaction entered the queue

current_timestamp

the current timestamp

compound_ops

List of compound operations (subset of tx_body.operations). Will be null if postchain calls v1.

See also

https://gitlab.com/chromaway/postchain/blob/dev/postchain-base/src/main/kotlin/net/postchain/base/BaseTransactionPrioritizer.kt

https://gitlab.com/chromaway/postchain/blob/dev/postchain-base/src/main/kotlin/net/postchain/base/BaseTransactionPrioritizer.kt