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

Function wallet_forward_status_in_db

wallet/wallet.h:120–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120static inline enum forward_status wallet_forward_status_in_db(enum forward_status s)
121{
122 switch (s) {
123 case FORWARD_OFFERED:
124 BUILD_ASSERT(FORWARD_OFFERED == 0);
125 return s;
126 case FORWARD_SETTLED:
127 BUILD_ASSERT(FORWARD_SETTLED == 1);
128 return s;
129 case FORWARD_FAILED:
130 BUILD_ASSERT(FORWARD_FAILED == 2);
131 return s;
132 case FORWARD_LOCAL_FAILED:
133 BUILD_ASSERT(FORWARD_LOCAL_FAILED == 3);
134 return s;
135 case FORWARD_ANY:
136 break;
137 }
138 fatal("%s: %u is invalid", __func__, s);
139}
140
141/* Wrapper to ensure types don't change, and we don't insert/extract
142 * invalid ones from db */

Callers 4

wallet_forward_deleteFunction · 0.85

Calls 1

fatalFunction · 0.50

Tested by

no test coverage detected