Skip to content

transaction: Add doc alias is_coinbase to is_coin_base method#1795

Closed
stevenroose wants to merge 1 commit intorust-bitcoin:masterfrom
stevenroose:alias-is-coinbase
Closed

transaction: Add doc alias is_coinbase to is_coin_base method#1795
stevenroose wants to merge 1 commit intorust-bitcoin:masterfrom
stevenroose:alias-is-coinbase

Conversation

@stevenroose
Copy link
Copy Markdown
Collaborator

It has officially been two times in two years that I remember thinking "heh, I really thought there was an is_coinbase method, but I guess I was wrong" to then later find it in the code.

This is just a doc alias so that searching for the method (and grepping the code!) will give you a result for is_coinbase.

Tbh, I'd be in favor of deprecating the method and renaming it as well, but well. I've never seen anyone write "coin base transaction" or "coin-base transaction", always just "coinbase transaction". But for the sake of stability, I like the doc alias.

@apoelstra
Copy link
Copy Markdown
Member

I think we should deprecate and rename.

@stevenroose
Copy link
Copy Markdown
Collaborator Author

Well, let's keep both options open and see:

#1796

I'm also more in favor of renaming.

@Kixunil
Copy link
Copy Markdown
Collaborator

Kixunil commented Apr 13, 2023

WTF, I'd swear we did already rename it.

@stevenroose
Copy link
Copy Markdown
Collaborator Author

Clippy... I'll go with 0.0.0-NEXT_RELEASE

@stevenroose
Copy link
Copy Markdown
Collaborator Author

WTF, I'd swear we did already rename it.

In rust-elements it's is_coinbase. So when I searched for it in my own doc index, I only found the elements one..

@tcharding
Copy link
Copy Markdown
Member

ha, when I read the PR title I literally thought "that's weird, why would there be a function called is_coin_base, 'coinbase' is one word"

apoelstra added a commit that referenced this pull request Apr 24, 2023
a54e1ce Apply rustfmt (The rustfmt Tyranny)
38d11ce ci: Make release CI search for NEXT.RELEASE instead (Steven Roose)
dad3abd transaction: Rename is_coin_base to is_coinbase (Steven Roose)

Pull request description:

  Alternative to #1795.

  Keep the old method as deprecated and add doc alias. Also change internal usage of the method.

ACKs for top commit:
  tcharding:
    ACK a54e1ce
  apoelstra:
    ACK a54e1ce

Tree-SHA512: 52d9729bf83da164556d960f8867cb836ff57a0f619da3dd3620efffb28a974aac23b8085863ab0e072a4bdb2f13ac576efa43ad2eec9a271ad044227f4d00a4
@tcharding
Copy link
Copy Markdown
Member

We can close this now since #1796 merged, right?

@Kixunil
Copy link
Copy Markdown
Collaborator

Kixunil commented May 4, 2023

Yes

@Kixunil Kixunil closed this May 4, 2023
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.

4 participants