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

Function output_status_in_db

wallet/wallet.h:47–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45};
46
47static inline enum output_status output_status_in_db(enum output_status s)
48{
49 switch (s) {
50 case OUTPUT_STATE_AVAILABLE:
51 BUILD_ASSERT(OUTPUT_STATE_AVAILABLE == 0);
52 return s;
53 case OUTPUT_STATE_RESERVED:
54 BUILD_ASSERT(OUTPUT_STATE_RESERVED == 1);
55 return s;
56 case OUTPUT_STATE_SPENT:
57 BUILD_ASSERT(OUTPUT_STATE_SPENT == 2);
58 return s;
59 /* This one doesn't go into db */
60 case OUTPUT_STATE_ANY:
61 break;
62 }
63 fatal("%s: %u is invalid", __func__, s);
64}
65
66/* Enumeration of all known output types. These include all types that
67 * could ever end up on-chain and we may need to react upon. Notice

Callers 5

wallet_get_utxosFunction · 0.85
db_set_utxoFunction · 0.85
wallet_find_utxoFunction · 0.85
wallet_outpoint_spendFunction · 0.85

Calls 1

fatalFunction · 0.50

Tested by

no test coverage detected