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

Function payment_current_amount

plugins/xpay/xpay.c:1280–1290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1278}
1279
1280static struct amount_msat payment_current_amount(const struct payment *payment)
1281{
1282 struct attempt *attempt;
1283 struct amount_msat sum = AMOUNT_MSAT(0);
1284
1285 list_for_each(&payment->current_attempts, attempt, list) {
1286 if (!amount_msat_accumulate(&sum, attempt->amount))
1287 abort();
1288 }
1289 return sum;
1290}
1291
1292static struct amount_msat attempt_fee(const struct attempt *attempt)
1293{

Callers 1

waitblockheight_doneFunction · 0.85

Calls 2

amount_msat_accumulateFunction · 0.85
abortFunction · 0.85

Tested by

no test coverage detected