MCPcopy Create free account
hub / github.com/ElementsProject/lightning / output_status_in_db

Function output_status_in_db

wallet/wallet.h:61–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59};
60
61static inline enum output_status output_status_in_db(enum output_status s)
62{
63 switch (s) {
64 case OUTPUT_STATE_AVAILABLE:
65 BUILD_ASSERT(OUTPUT_STATE_AVAILABLE == 0);
66 return s;
67 case OUTPUT_STATE_RESERVED:
68 BUILD_ASSERT(OUTPUT_STATE_RESERVED == 1);
69 return s;
70 case OUTPUT_STATE_SPENT:
71 BUILD_ASSERT(OUTPUT_STATE_SPENT == 2);
72 return s;
73 /* This one doesn't go into db */
74 case OUTPUT_STATE_ANY:
75 break;
76 }
77 fatal("%s: %u is invalid", __func__, s);
78}
79
80/* Enumeration of all known output types. These include all types that
81 * could ever end up on-chain and we may need to react upon. Notice

Callers 6

db_get_unspent_utxosFunction · 0.85
db_set_utxoFunction · 0.85
wallet_find_utxoFunction · 0.85
wallet_has_fundsFunction · 0.85
wallet_outpoint_spendFunction · 0.85

Calls 1

fatalFunction · 0.50

Tested by

no test coverage detected