coverage badge

This commit is contained in:
callebtc
2022-10-16 13:41:46 +02:00
parent 82b14bcfbb
commit 6481a2d5cd
3 changed files with 2 additions and 21 deletions

View File

@@ -2,7 +2,8 @@
**Cashu is a Chaumian Ecash wallet and mint with Bitcoin Lightning support.**
<a href="https://pypi.org/project/cashu/"><img alt="Release" src="https://img.shields.io/pypi/v/cashu?color=black"></a>
<a href="https://pypi.org/project/cashu/"><img alt="Release" src="https://img.shields.io/pypi/v/cashu?color=black"></a><a href="https://app.codecov.io/gh/callebtc/cashu"><img alt="Coverage" src="https://img.shields.io/codecov/c/gh/callebtc/cashu"></a>
*Disclaimer: The author is NOT a cryptographer and this work has not been reviewed. This means that there is very likely a fatal flaw somewhere. Cashu is still experimental and not production-ready.*

View File

@@ -207,16 +207,6 @@ class Ledger:
sum_outputs = sum(self._verify_amount(p.amount) for p in outs)
assert sum_outputs - sum_inputs == 0
def _get_output_split(self, amount: int):
"""Given an amount returns a list of amounts returned e.g. 13 is [1, 4, 8]."""
self._verify_amount(amount)
bits_amt = bin(amount)[::-1][:-2]
rv = []
for (pos, bit) in enumerate(bits_amt):
if bit == "1":
rv.append(2**pos)
return rv
async def _request_lightning_invoice(self, amount: int):
"""Returns an invoice from the Lightning backend."""
error, balance = await self.lightning.status()

View File

@@ -53,16 +53,6 @@ class LedgerAPI:
self.s = requests.Session()
self.s.headers.update({"Client-version": VERSION})
@staticmethod
def _get_output_split(amount):
"""Given an amount returns a list of amounts returned e.g. 13 is [1, 4, 8]."""
bits_amt = bin(amount)[::-1][:-2]
rv = []
for (pos, bit) in enumerate(bits_amt):
if bit == "1":
rv.append(2**pos)
return rv
def _construct_proofs(
self, promises: List[BlindedSignature], secrets: List[str], rs: List[str]
):