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

Function median_conversion

tests/test_currencyrate.py:35–39  ·  view source on GitHub ↗
(amount, rateslist)

Source from the content-addressed store, hash-verified

33
34
35def median_conversion(amount, rateslist):
36 msats = amount * 100_000_000_000 / median(rateslist)
37
38 # Give it +/- 1%
39 return range(int(msats * 0.99), int(msats * 1.01))
40
41
42def median_rate(rateslist):

Callers 3

test_apis_batch1Function · 0.85
test_apis_batch2Function · 0.85
test_custom_sourceFunction · 0.85

Calls 1

medianFunction · 0.85

Tested by

no test coverage detected