Get TxState serialized block hash. Inverse of TxStateInterpretSerialized.
| 85 | |
| 86 | //! Get TxState serialized block hash. Inverse of TxStateInterpretSerialized. |
| 87 | static inline uint256 TxStateSerializedBlockHash(const TxState& state) |
| 88 | { |
| 89 | return std::visit(util::Overloaded{ |
| 90 | [](const TxStateInactive& inactive) { return inactive.abandoned ? uint256::ONE : uint256::ZERO; }, |
| 91 | [](const TxStateInMempool& in_mempool) { return uint256::ZERO; }, |
| 92 | [](const TxStateConfirmed& confirmed) { return confirmed.confirmed_block_hash; }, |
| 93 | [](const TxStateConflicted& conflicted) { return conflicted.conflicting_block_hash; }, |
| 94 | [](const TxStateUnrecognized& unrecognized) { return unrecognized.block_hash; } |
| 95 | }, state); |
| 96 | } |
| 97 | |
| 98 | //! Get TxState serialized block index. Inverse of TxStateInterpretSerialized. |
| 99 | static inline int TxStateSerializedIndex(const TxState& state) |
no outgoing calls