Skip to content

Allow submitting transactions ignoring follow events#1962

Merged
jsdw merged 2 commits intomasterfrom
jsdw-submit-tx-ignoring-follow
Mar 14, 2025
Merged

Allow submitting transactions ignoring follow events#1962
jsdw merged 2 commits intomasterfrom
jsdw-submit-tx-ignoring-follow

Conversation

@jsdw
Copy link
Copy Markdown
Collaborator

@jsdw jsdw commented Mar 12, 2025

Closes #1956

@jsdw jsdw requested a review from a team as a code owner March 12, 2025 15:51
Comment on lines +804 to +814
if self.submit_transactions_ignoring_follow_events {
submit_transaction_ignoring_follow_events(extrinsic, &self.methods).await
} else {
submit_transaction_tracking_follow_events::<T>(
extrinsic,
self.transaction_timeout_secs as u64,
&self.methods,
&self.follow_handle,
)
.await
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just moved the existing logic into submit_transaction_tracking_follow_events and added an alternative path which is muc hsimpler for ignoring them

/// This can lead to errors when calling APIs like `wait_for_finalized_success`, which will try to retrieve events
/// at the finalized block, because there will be a race and the finalized block may not be available for querying
/// yet.
pub fn submit_transactions_ignoring_follow_events(mut self) -> Self {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a little long name :)

I don't have a better suggestion in mind though

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah; it's quite long but also quite a rare thing to set I would hope, so I don't mind I guess!

@jsdw jsdw merged commit 06e658c into master Mar 14, 2025
13 checks passed
@jsdw jsdw deleted the jsdw-submit-tx-ignoring-follow branch March 14, 2025 16:08
@michalkucharczyk
Copy link
Copy Markdown

Thank you!

@jsdw jsdw mentioned this pull request May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow submitting transactions via ChainHeadBackend to _not_ track follow events

3 participants