MCPcopy Create free account
hub / github.com/ElementsProject/elements / TxStateSerializedIndex

Function TxStateSerializedIndex

src/wallet/transaction.h:99–108  ·  view source on GitHub ↗

Get TxState serialized block index. Inverse of TxStateInterpretSerialized.

Source from the content-addressed store, hash-verified

97
98//! Get TxState serialized block index. Inverse of TxStateInterpretSerialized.
99static 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
111typedef std::map<std::string, std::string> mapValue_t;

Callers 3

SerializeMethod · 0.85
AddToWalletMethod · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls

no outgoing calls

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68