fix: Display number of txs in logs
This commit is contained in:
parent
71f162218f
commit
3b6830e216
2
main.py
2
main.py
@ -83,6 +83,7 @@ def saveTransactions(txList, blockHeight):
|
|||||||
# Prepare data for batch insert
|
# Prepare data for batch insert
|
||||||
txValues = []
|
txValues = []
|
||||||
for txData in txList:
|
for txData in txList:
|
||||||
|
print('.', end='', flush=True)
|
||||||
txValues.append((
|
txValues.append((
|
||||||
txData["hash"], txData["witnessHash"], txData["fee"], txData["rate"],
|
txData["hash"], txData["witnessHash"], txData["fee"], txData["rate"],
|
||||||
txData["mtime"], blockHeight, txData["index"], txData["version"],
|
txData["mtime"], blockHeight, txData["index"], txData["version"],
|
||||||
@ -101,7 +102,6 @@ def saveTransactions(txList, blockHeight):
|
|||||||
with dbSave.cursor() as cursor:
|
with dbSave.cursor() as cursor:
|
||||||
cursor.executemany(query, txValues)
|
cursor.executemany(query, txValues)
|
||||||
dbSave.commit()
|
dbSave.commit()
|
||||||
print('.', end='', flush=True)
|
|
||||||
|
|
||||||
def saveBlock(blockData):
|
def saveBlock(blockData):
|
||||||
hashes = [tx["hash"] for tx in blockData["txs"]]
|
hashes = [tx["hash"] for tx in blockData["txs"]]
|
||||||
|
Loading…
Reference in New Issue
Block a user