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

Function wallet_payment_status_in_db

wallet/wallet.h:314–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312};
313
314static inline enum wallet_payment_status wallet_payment_status_in_db(enum wallet_payment_status w)
315{
316 switch (w) {
317 case PAYMENT_PENDING:
318 BUILD_ASSERT(PAYMENT_PENDING == 0);
319 return w;
320 case PAYMENT_COMPLETE:
321 BUILD_ASSERT(PAYMENT_COMPLETE == 1);
322 return w;
323 case PAYMENT_FAILED:
324 BUILD_ASSERT(PAYMENT_FAILED == 2);
325 return w;
326 }
327 fatal("%s: %u is invalid", __func__, w);
328}
329
330/* Outgoing payments. A simple persisted representation
331 * of a payment we initiated. This can be used by

Callers 1

Calls 1

fatalFunction · 0.50

Tested by

no test coverage detected