pub fn ensure_priority_boost_is_sane<Runtime, MessagesInstance, PriorityBoostPerMessage>(
tip_boost_per_message: <<Runtime as Config>::OnChargeTransaction as OnChargeTransaction<Runtime>>::Balance,
)where
Runtime: Config + Config<MessagesInstance>,
MessagesInstance: 'static,
PriorityBoostPerMessage: Get<TransactionPriority>,
Runtime::RuntimeCall: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
<<Runtime as Config>::OnChargeTransaction as OnChargeTransaction<Runtime>>::Balance: Send + Sync + FixedPointOperand,
Expand description
Ensures that the value of PriorityBoostPerMessage
matches the value of
tip_boost_per_message
.
We want two transactions, TX1
with N
messages and TX2
with N+1
messages, have
almost the same priority if we’ll add tip_boost_per_message
tip to the TX1
. We want
to be sure that if we add plain PriorityBoostPerMessage
priority to TX1
, the
priority will be close to TX2
as well.