rippled
|
Used for sorting MaybeTx. More...
Public Member Functions | |
OrderCandidates ()=default | |
Default constructor. More... | |
bool | operator() (const MaybeTx &lhs, const MaybeTx &rhs) const |
Sort MaybeTx by feeLevel descending, then by pseudo-randomized transaction ID ascending. More... | |
|
explicitdefault |
Default constructor.
Sort MaybeTx by feeLevel
descending, then by pseudo-randomized transaction ID ascending.
The transaction queue is ordered such that transactions paying a higher fee are in front of transactions paying a lower fee, giving them an opportunity to be processed into the open ledger first. Within transactions paying the same fee, order by the arbitrary but consistent pseudo-randomized transaction ID. The ID is pseudo-randomized by XORing it with the open ledger's parent hash, which is deterministic, but unpredictable. This allows validators to build similar queues in the same order, and thus have more similar initial proposals.