Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Add sha256::Midstate type#39

Merged
apoelstra merged 3 commits intorust-bitcoin:masterfrom
stevenroose:sha256-midstate
May 22, 2019
Merged

Add sha256::Midstate type#39
apoelstra merged 3 commits intorust-bitcoin:masterfrom
stevenroose:sha256-midstate

Conversation

@stevenroose
Copy link
Copy Markdown
Collaborator

@stevenroose stevenroose commented Apr 28, 2019

Builds on #40.

In Elements we use this type to represent witness merkle roots and Asset IDs.

@apoelstra
Copy link
Copy Markdown
Member

You need to change the type of sha256::Engine::Midstate to the new type.

@stevenroose stevenroose force-pushed the sha256-midstate branch 3 times, most recently from faa02e0 to bd75e6c Compare April 29, 2019 08:08
src/sha256.rs Outdated
impl HashEngine {
/// Create a new [HashEngine] from a midstate.
///
/// Be aware that this method only works when [length] is a multiple of the block size.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you assert! this? Ok if you add it in a separate commit @stevenroose

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.

Done.

@apoelstra
Copy link
Copy Markdown
Member

ACK except nit

@stevenroose
Copy link
Copy Markdown
Collaborator Author

Added blocksize multiple assertion in separate commit.

@apoelstra apoelstra merged commit be81881 into rust-bitcoin:master May 22, 2019
shesek added a commit to shesek/electrs that referenced this pull request May 24, 2019
Unimplemented for re-issuance transactions.

Depends on an umerged PR to bitcoin_hashes (ttps://github.com/rust-bitcoin/bitcoin_hashes/pull/39)
shesek added a commit to shesek/electrs that referenced this pull request Jun 23, 2019
Unimplemented for re-issuance transactions.

Depends on an umerged PR to bitcoin_hashes (ttps://github.com/rust-bitcoin/bitcoin_hashes/pull/39)
shesek added a commit to shesek/electrs that referenced this pull request Jun 24, 2019
Unimplemented for re-issuance transactions.

Depends on an umerged PR to bitcoin_hashes (ttps://github.com/rust-bitcoin/bitcoin_hashes/pull/39)
shesek added a commit to shesek/electrs that referenced this pull request Jun 29, 2019
Unimplemented for re-issuance transactions.

Depends on an umerged PR to bitcoin_hashes (ttps://github.com/rust-bitcoin/bitcoin_hashes/pull/39)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants