| 143 | { |
| 144 | using result_type = ByPeerView; |
| 145 | result_type operator()(const Announcement& ann) const |
| 146 | { |
| 147 | return ByPeerView{ann.m_peer, ann.GetState() == State::CANDIDATE_BEST, ann.m_gtxid.ToUint256()}; |
| 148 | } |
| 149 | }; |
| 150 | |
| 151 | // The ByTxHash index is sorted by (txhash, state, priority). |