Skip to content

fix: Fix slow tx processing on some edge cases #957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion hathor/consensus/transaction_consensus.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,12 @@ def update_voided_info(self, tx: Transaction) -> None:
conflict_tx = cast(Transaction, tx.storage.get_transaction(h))
conflict_tx_meta = conflict_tx.get_metadata()
if conflict_tx_meta.voided_by:
self.mark_as_voided(conflict_tx)
if conflict_tx_meta.first_block is not None:
# do nothing
assert bool(self.context.consensus.soft_voided_tx_ids & conflict_tx_meta.voided_by)
self.log.info('skipping soft voided conflict', conflict_tx=conflict_tx.hash_hex)
else:
self.mark_as_voided(conflict_tx)

# Finally, check our conflicts.
meta = tx.get_metadata()
Expand Down