This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix transaction pool event sending (#6341)
This pr fixes a bug with the transaction pool not sending certain events like finalized and also fixes the order of events. The problem with the finalized event was that we did not extracted pruned extrinsics if there were not ready transactions in the pool. However this is wrong, if we have a re-org, a tx is clearly not ready anymore and we still need to send a pruned event for it because it is in a new block included. This also lead to sending "ready" events and tx being re-validated. The listener also only send the "finalized" event if it has seen a block as being included, which did not happen before with the old code. The second fix of the pr is the order of events. If we prune and retract the same transaction in the same block, we first need to send the "retract" event and after that the "pruned" event, because finalization takes longer and this would lead to the UI showing "retract" while it actually is included.
- Loading branch information
Showing
2 changed files
with
69 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters