doc/log touchups

This commit is contained in:
Tim
2024-02-15 20:52:35 -04:00
parent b392a23a94
commit ea56487002
2 changed files with 28 additions and 4 deletions

View File

@@ -20,14 +20,14 @@ from dexorder.ohlc import recent_ohlcs, ohlc_save, ohlcs
from dexorder.runner import BlockStateRunner from dexorder.runner import BlockStateRunner
from dexorder.util import hexstr from dexorder.util import hexstr
log = logging.getLogger('dexorder') log = logging.getLogger('dexorder.backfill')
def finalize_callback(block: Block, diffs: Reversible[Union[DiffItem, DiffEntryItem]]): def finalize_callback(block: Block, diffs: Reversible[Union[DiffItem, DiffEntryItem]]):
start = now() # start = now()
log.info("finalizing OHLC's...") log.info("finalizing OHLC's")
ohlc_save(block, diffs) ohlc_save(block, diffs)
log.info(f'\ttook {(now() - start).total_seconds():.1f} seconds') # log.info(f'\ttook {(now() - start).total_seconds():.1f} seconds')
log.info(f'backfill completed through block {block.height} {from_timestamp(block.timestamp):%Y-%m-%d %H:%M:%S} {hexstr(block.hash)}') log.info(f'backfill completed through block {block.height} {from_timestamp(block.timestamp):%Y-%m-%d %H:%M:%S} {hexstr(block.hash)}')

View File

@@ -1,3 +1,27 @@
# Prints a JSON string to stdout containing metadata information for all the known tokens and pools
#
# {
# "t": [
# {
# "a": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", // address
# "n": "Wrapped Ether", // name
# "s": "WETH", // symbol
# "d": 18 // decimals
# }
# ],
# "p": [
# {
# "a": "0x17c14D2c404D167802b16C450d3c99F88F2c4F4d", // address
# "b": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", // base token (token0)
# "q": "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8", // quote token (token1)
# "f": 3000, // fee in millionths
# "e": 1, // exchange (see Exchange enum) 1=UniswapV3
# "d": 12 // decimals, may be negative
# }
# ]
# }
#
import json import json
import logging import logging
import sys import sys