block-for-time script
This commit is contained in:
5
bin/block-for-time
Executable file
5
bin/block-for-time
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR="$(dirname -- "$( readlink -f -- "$0"; )";)"
|
||||
|
||||
DEXORDER_RPC_URL=arbitrum_alchemy PYTHONPATH="$SCRIPT_DIR/../src" python -m dexorder.bin.block_for_time "$@"
|
||||
@@ -53,11 +53,7 @@ async def _fetch(fetch: FetchLock, chain_id: int, block_id: Union[int,bytes]) ->
|
||||
else:
|
||||
found = db.session.get(DbBlock, dict(chain=chain, hash=block_id)) # by-hash is the primary key
|
||||
if found:
|
||||
log.debug(f'found block: {found}')
|
||||
try:
|
||||
return Block(chain_id, found.data)
|
||||
except AttributeError:
|
||||
log.exception(f'found was {found}')
|
||||
|
||||
# fetch from RPC
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user