This patch changes CTxMemPool::mapTx from a std::map to a boost::multi_index_container.
The container has three indexes:
- Tx Hash
- Fee Rate (fee-per-kb) - ordered from highest to lowest
- Priority (at current chain height) - ordered from highest to lowest
The idea is that these indices can later be used for:
- Creating blocks
- Mempool eviction
The priority stuff is a bit ugly, so suggestions on alternate designs are welcome. I would also like to add another test case that tests the ConnectTip/DisconnectTip triggers, but I need to do some more work to figure out how to construct such a test.