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

Function fromwire_onchain_fee

plugins/bkpr/onchain_fee.c:153–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153static struct onchain_fee *fromwire_onchain_fee(struct onchain_fees *onchain_fees,
154 const u8 **pptr, size_t *max)
155{
156 const char *acctname;
157 struct bitcoin_txid txid;
158 struct amount_msat credit;
159 struct amount_msat debit;
160 u64 timestamp;
161 u32 update_count;
162
163 acctname = fromwire_wirestring(tmpctx, pptr, max);
164 fromwire_bitcoin_txid(pptr, max, &txid);
165 credit = fromwire_amount_msat(pptr, max);
166 debit = fromwire_amount_msat(pptr, max);
167 timestamp = fromwire_u64(pptr, max);
168 update_count = fromwire_u32(pptr, max);
169 if (pptr == NULL)
170 return NULL;
171
172 return new_onchain_fee(onchain_fees,
173 take(acctname), &txid, credit, debit, timestamp,
174 update_count);
175}
176
177static const char **ds_ofee_path(const tal_t *ctx, const char *acctname TAKES)
178{

Callers 1

init_onchain_feesFunction · 0.85

Calls 6

fromwire_bitcoin_txidFunction · 0.85
new_onchain_feeFunction · 0.85
fromwire_wirestringFunction · 0.50
fromwire_amount_msatFunction · 0.50
fromwire_u64Function · 0.50
fromwire_u32Function · 0.50

Tested by

no test coverage detected