kopia lustrzana https://github.com/bugout-dev/moonstream
Small updates
rodzic
3326379b17
commit
4f8f589df2
|
@ -11,7 +11,7 @@ fastapi==0.66.0
|
|||
h11==0.12.0
|
||||
idna==3.2
|
||||
jmespath==0.10.0
|
||||
-e git+https://git@github.com/bugout-dev/moonstream.git@b9c828fc7f811af88a9f3a45dd7f5c4053433366#egg=moonstreamdb&subdirectory=db
|
||||
-e git+https://git@github.com/bugout-dev/moonstream.git@3326379b174a626cf876c7b60dd7db8afe2daba9#egg=moonstreamdb&subdirectory=db
|
||||
mypy==0.910
|
||||
mypy-extensions==0.4.3
|
||||
pathspec==0.9.0
|
||||
|
|
|
@ -66,13 +66,13 @@ def get_latest_blocks(with_transactions: bool = False) -> None:
|
|||
"latest", full_transactions=with_transactions
|
||||
)
|
||||
with yield_db_session_ctx() as db_session:
|
||||
block_latest_exist = (
|
||||
db_session.query(EthereumBlock)
|
||||
block_number_latest_exist = (
|
||||
db_session.query(EthereumBlock.block_number)
|
||||
.order_by(EthereumBlock.block_number.desc())
|
||||
.first()
|
||||
)
|
||||
|
||||
return block_latest_exist.block_number, block_latest.number
|
||||
return block_number_latest_exist, block_latest.number
|
||||
|
||||
|
||||
def crawl_blocks(
|
||||
|
@ -107,7 +107,7 @@ def check_missing_blocks(blocks_numbers: List[int]) -> List[int]:
|
|||
for block_number in blocks_numbers:
|
||||
with yield_db_session_ctx() as db_session:
|
||||
block_exist = (
|
||||
db_session.query(EthereumBlock)
|
||||
db_session.query(EthereumBlock.block_number)
|
||||
.filter(EthereumBlock.block_number == block_number)
|
||||
.one_or_none()
|
||||
)
|
||||
|
|
Plik binarny nie jest wyświetlany.
Ładowanie…
Reference in New Issue