-
Notifications
You must be signed in to change notification settings - Fork 245
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
refactor: rename to reqd_confs #353
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a few more updates
crates/provider/src/heart.rs
Outdated
@@ -108,18 +108,18 @@ impl<'a, N: Network, T: Transport + Clone> PendingTransactionBuilder<'a, N, T> { | |||
} | |||
|
|||
/// Returns the number of confirmations to wait for. | |||
pub const fn confirmations(&self) -> u64 { | |||
self.config.confirmations() | |||
pub const fn reqd_confs(&self) -> u64 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe #[doc(alias = "confirmations")]
on at least one of these for discoverability?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll go ahead and alias them all 👍
35c955a
to
1009bca
Compare
@@ -108,18 +108,21 @@ impl<'a, N: Network, T: Transport + Clone> PendingTransactionBuilder<'a, N, T> { | |||
} | |||
|
|||
/// Returns the number of confirmations to wait for. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Returns the number of confirmations to wait for. | |
/// Returns the number of required confirmations to wait for. |
or is this requested?
I also wouldn't mind if we use fn required_confirmations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind any particular name. I suppose this gets used most often in new-lined builder patterns where fn name lenght is not a primary concern. so that means longer and clearer is better
Motivation
Clarify naming on pending transaction and associated structs
Solution
rename
confirmations
toreqd_confs
PR Checklist