Skip to content

Commit

Permalink
add missed aborted tx process entry
Browse files Browse the repository at this point in the history
  • Loading branch information
HarukaMa committed Sep 14, 2024
1 parent 4b6d0e9 commit 2a6dd24
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion db/insert.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ async def _insert_transaction(self, cur: psycopg.AsyncCursor[DictRow], redis: Re
if (await cur.fetchone()) is not None:
await self._process_aborted_transaction(cur, transaction.id)

async def _process_aborted_transaction(self, cur: psycopg.AsyncCursor[DictRow], aborted_transaction_id: TransactionID):
@staticmethod
async def _process_aborted_transaction(cur: psycopg.AsyncCursor[DictRow], aborted_transaction_id: TransactionID):
await cur.execute(
"SELECT id FROM transaction WHERE transaction_id = %s",
(str(aborted_transaction_id),)
Expand Down Expand Up @@ -1579,6 +1580,7 @@ async def _save_block(self, block: Block):
"INSERT INTO block_aborted_transaction_id (block_id, transaction_id) VALUES (%s, %s)",
(block_db_id, str(aborted))
)
await self._process_aborted_transaction(cur, aborted)

for aborted in block.aborted_solution_ids:
await cur.execute(
Expand Down

0 comments on commit 2a6dd24

Please sign in to comment.