-
Notifications
You must be signed in to change notification settings - Fork 827
transaction: Rename is_coin_base to is_coinbase #1796
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
transaction: Rename is_coin_base to is_coinbase #1796
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.
ACK b2e90eaabfa7c7683882484ae5dfc137f787190f
I prefer this to the alternative.
Lolll looks like we need to stick |
b2e90ea
to
5ad3da2
Compare
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.
ACK 5ad3da256ba221f945be275ac2e6dba0398f6950
@@ -981,10 +981,19 @@ impl Transaction { | |||
/// transaction. It is impossible to check if the transaction is first in the block, so this | |||
/// function checks the structure of the transaction instead - the previous output must be | |||
/// all-zeros (creates satoshis "out of thin air"). | |||
pub fn is_coin_base(&self) -> bool { | |||
#[doc(alias = "is_coin_base")] // method previously had this name |
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.
Interesting, is the idea to remove this when we remove the deprecated function? I've never used this attribute myself.
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'd keep it for as long as we can tolerate it. Anyone might remember the old name and search for it. It doesn't hurt I guess, it only makes it show up in search when you search for that name.
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.
Yeah, I wouldn't mind keeping it forever. Not just because it had this name but also that it's a name someone might think of.
Looks like "NEXT_RELEASE" will need to go in in the "note = NEXT RELEASE" field. We should grep for "NEXT.RELEASE" too so we don't miss "NEXT-RELEASE" or "NEXT RELEASE", and leave that in released code which would be pretty embarrassing. |
We could also allow the lint in non-release PRs and enable it in release PRs. |
I like this. I think we do it by |
Grrrr at clippy enforcement, it's so unproductive! So I will try to silence clippy for non-release CI then? Is that the consensus? Let me see if I can figure out how to do that. |
Keep the old method as deprecated and add doc alias. Also change internal usage of the method.
5ad3da2
to
dad3abd
Compare
Hmm, I'm not sure how the CI is built, but running clippy in the release job would require having nightly cargo in that job and I don't think we want that? I went for what Tobin suggested instead, renaming to |
Why would nightly be a problem? Sure there's a risk that release gets stalled a bit due to a nightly bug but worst case we could turn it off. |
Nightly is generally a problem, right? What if a regression in nightly actually makes the release go through while it shouldn't? In fact I'd say it makes most sense to test the release in MSRV. Idk exactly what the release command checks for
8000
and how it differs from Anyway, I think like it's done in my latest commit should make sense. |
I believe we should test on all versions. |
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.
ACK 38d11ce
CI fail is a formatting issue in patch 1 bro. Your favourite :) |
pushed a fix |
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.
ACK a54e1ce
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.
ACK a54e1ce
Lol, just noticed the author of the last commit. |
Alternative to #1795.
Keep the old method as deprecated and add doc alias. Also change internal usage of the method.