Get TxState serialized block hash. Inverse of TxStateInterpretSerialized.
| 98 | |
| 99 | //! Get TxState serialized block hash. Inverse of TxStateInterpretSerialized. |
| 100 | static inline uint256 TxStateSerializedBlockHash(const TxState& state) |
| 101 | { |
| 102 | return std::visit(util::Overloaded{ |
| 103 | [](const TxStateInactive& inactive) { return inactive.abandoned ? uint256::ONE : uint256::ZERO; }, |
| 104 | [](const TxStateInMempool& in_mempool) { return uint256::ZERO; }, |
| 105 | [](const TxStateConfirmed& confirmed) { return confirmed.confirmed_block_hash; }, |
| 106 | [](const TxStateBlockConflicted& conflicted) { return conflicted.conflicting_block_hash; }, |
| 107 | [](const TxStateUnrecognized& unrecognized) { return unrecognized.block_hash; } |
| 108 | }, state); |
| 109 | } |
| 110 | |
| 111 | //! Get TxState serialized block index. Inverse of TxStateInterpretSerialized. |
| 112 | static inline int TxStateSerializedIndex(const TxState& state) |
no outgoing calls