Get TxState serialized block index. Inverse of TxStateInterpretSerialized.
| 97 | |
| 98 | //! Get TxState serialized block index. Inverse of TxStateInterpretSerialized. |
| 99 | static inline int TxStateSerializedIndex(const TxState& state) |
| 100 | { |
| 101 | return std::visit(util::Overloaded{ |
| 102 | [](const TxStateInactive& inactive) { return inactive.abandoned ? -1 : 0; }, |
| 103 | [](const TxStateInMempool& in_mempool) { return 0; }, |
| 104 | [](const TxStateConfirmed& confirmed) { return confirmed.position_in_block; }, |
| 105 | [](const TxStateConflicted& conflicted) { return -1; }, |
| 106 | [](const TxStateUnrecognized& unrecognized) { return unrecognized.index; } |
| 107 | }, state); |
| 108 | } |
| 109 | |
| 110 | |
| 111 | typedef std::map<std::string, std::string> mapValue_t; |
no outgoing calls