I am reading "Mastering Bitcoin written by Andreas" and I found this explanation of mining.
Transactions are added to the new block, prioritized by the highest-fee transactions first and a few other criteria.
I want to know what the a few other criteria are. And I want to see the source code where the system prioritizes by highest-fee transactions first and a few other criteria.
I guess that the code is in miner.cpp. But I don't understand the exact line.
https://github.com/bitcoin/bitcoin/blob/master/src/miner.cpp