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

Function onchainfee_to_income

plugins/bkpr/incomestmt.c:71–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71static struct income_event *onchainfee_to_income(const tal_t *ctx,
72 struct onchain_fee *fee)
73{
74 struct income_event *inc = tal(ctx, struct income_event);
75
76 inc->acct_name = tal_strdup(inc, fee->acct_name);
77 inc->tag = tal_fmt(inc, "%s", ONCHAIN_FEE);
78 /* We swap these, as they're actually opposite */
79 inc->credit = fee->debit;
80 inc->debit = fee->credit;
81 inc->fees = AMOUNT_MSAT(0);
82 inc->timestamp = fee->timestamp;
83 inc->txid = tal_dup(inc, struct bitcoin_txid, &fee->txid);
84 inc->outpoint = NULL;
85 inc->payment_id = NULL;
86 inc->desc = NULL;
87
88 return inc;
89}
90
91/* CSVs don't like ',' in the middle. We short circuit this
92 * by wrapping the desc in double-quotes ("). But what if

Callers 1

list_income_eventsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected