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

Function calc_fee

channeld/test/run-commit_tx.c:421–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419
420#ifdef DEBUG
421static struct amount_sat calc_fee(const struct bitcoin_tx *tx, struct amount_sat input)
422{
423 size_t i;
424 struct amount_sat output = AMOUNT_SAT(0), fee;
425
426 for (i = 0; i < tal_count(tx->output); i++)
427 output.satoshis += tx->output[i].amount;
428
429 if (!amount_sub_sat(&fee, input, output))
430 abort();
431 return fee;
432}
433
434/* For debugging, we do brute-force increase to find thresholds */
435static u32 increase(u32 feerate_per_kw)

Callers 1

mainFunction · 0.85

Calls 1

abortFunction · 0.85

Tested by

no test coverage detected