Merge pull request #3590 from lbryio/fix-address_list-pagination

fix pagination with `address_list` command
This commit is contained in:
Lex Berezhny 2022-04-06 09:52:41 -04:00 committed by GitHub
commit 8cdcd770c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1211,6 +1211,7 @@ class Database(SQLiteMixin):
return addresses return addresses
async def get_address_count(self, cols=None, read_only=False, **constraints): async def get_address_count(self, cols=None, read_only=False, **constraints):
self._clean_txo_constraints_for_aggregation(constraints)
count = await self.select_addresses('COUNT(*) as total', read_only=read_only, **constraints) count = await self.select_addresses('COUNT(*) as total', read_only=read_only, **constraints)
return count[0]['total'] or 0 return count[0]['total'] or 0