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

Function summary

tests/test_askrene.py:3011–3020  ·  view source on GitHub ↗

(succeeded, failed, longest path, total fee, mean probability_ppm)

(results)

Source from the content-addressed store, hash-verified

3009 return sum(r["path"][0]["amount_in_msat"] for r in res["routes"]) - AMOUNT
3010
3011 def summary(results):
3012 """(succeeded, failed, longest path, total fee, mean probability_ppm)"""
3013 ok = [res for res in results.values() if not isinstance(res, RpcError)]
3014 return (
3015 len(ok),
3016 len(results) - len(ok),
3017 max(longest(res) for res in ok),
3018 sum(fee(res) for res in ok),
3019 sum(res["probability_ppm"] for res in ok) // len(ok),
3020 )
3021
3022 base = getroutes_all(None)
3023 assert not any(isinstance(res, RpcError) for res in base.values())

Callers 1

test_real_data_maxhopsFunction · 0.85

Calls 2

longestFunction · 0.85
feeFunction · 0.85

Tested by

no test coverage detected