mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-13 12:33:25 +02:00
Add type hints for get settle index method (#1317)
This commit is contained in:
parent
25e07848e9
commit
cafbb392ec
2 changed files with 2 additions and 2 deletions
|
|
@ -1248,7 +1248,7 @@ class SqueakDb:
|
|||
with self.get_connection() as connection:
|
||||
connection.execute(stmt)
|
||||
|
||||
def get_latest_settle_index(self):
|
||||
def get_latest_settle_index(self) -> Optional[int]:
|
||||
""" Get the lnd settled index of the most recent received payment. """
|
||||
s = select(
|
||||
[func.max(self.received_payments.c.settle_index)],
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class PaymentProcessorTask:
|
|||
)
|
||||
self.stopped.wait(self.retry_s)
|
||||
|
||||
def get_latest_settle_index(self):
|
||||
def get_latest_settle_index(self) -> int:
|
||||
return self.squeak_db.get_latest_settle_index() or 0
|
||||
|
||||
def get_sent_offer_for_payment_hash(self, payment_hash: bytes) -> SentOffer:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue