Skip to content

Issue #394 - Refactor Block::merkle_root() #775

Merged
apoelstra merged 2 commits intorust-bitcoin:masterfrom
nilswloewen:issue_394
Jan 13, 2022
Merged

Issue #394 - Refactor Block::merkle_root() #775
apoelstra merged 2 commits intorust-bitcoin:masterfrom
nilswloewen:issue_394

Conversation

@nilswloewen
Copy link
Copy Markdown
Contributor

Refactor Block::merkle_root() to Block::compute_merkle_root() and deprecate Block::merkle_root().

Block::compute_merkle_root() and deprecate Block::merkle_root().
@tcharding
Copy link
Copy Markdown
Member

Ha! The title of this PR threw me, I thought it was an issue not a PR :)

@apoelstra
Copy link
Copy Markdown
Member

This looks fine to me because it's just a 2-line function, but it might be clearer if the deprecated function just called the non-deprecated one rather than duplicating the logic.

concept ACK changing the name.

Copy link
Copy Markdown
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

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

With the deprecated version changed, LGTM!

@nilswloewen
Copy link
Copy Markdown
Contributor Author

Thanks for the feedback @apoelstra and @tcharding. I've made the changes you've suggested.

@tcharding
Copy link
Copy Markdown
Member

Thanks, LGTM.

@Kixunil
Copy link
Copy Markdown
Collaborator

Kixunil commented Jan 13, 2022

I think squashing would be useful.

Copy link
Copy Markdown
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK cd2435c

Thanks for your contribution!

Agreed about squashing, but for such a small diff I'm not going to hold things up.

Copy link
Copy Markdown
Collaborator

@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

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

ACK cd2435c

@apoelstra apoelstra merged commit 907b3a7 into rust-bitcoin:master Jan 13, 2022
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