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

Function onchainfee_to_income

plugins/bkpr/incomestmt.c:87–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87static struct income_event *onchainfee_to_income(const tal_t *ctx,
88 struct onchain_fee *fee)
89{
90 struct income_event *inc = tal(ctx, struct income_event);
91
92 inc->acct_name = tal_strdup(inc, fee->acct_name);
93 inc->tag = tal_fmt(inc, "%s", ONCHAIN_FEE);
94 /* We swap these, as they're actually opposite */
95 inc->credit = fee->debit;
96 inc->debit = fee->credit;
97 inc->fees = AMOUNT_MSAT(0);
98 inc->currency = tal_strdup(inc, fee->currency);
99 inc->timestamp = fee->timestamp;
100 inc->txid = tal_dup(inc, struct bitcoin_txid, &fee->txid);
101 inc->outpoint = NULL;
102 inc->payment_id = NULL;
103 inc->desc = NULL;
104
105 return inc;
106}
107
108/* CSVs don't like ',' in the middle. We short circuit this
109 * 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