Add type hints for get settle index method (#1317)

This commit is contained in:
Jonathan Zernik 2021-09-16 16:30:56 -07:00 committed by GitHub
parent 25e07848e9
commit cafbb392ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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)],

View file

@ -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: