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

Add sha256::Midstate type #39

Merged
merged 3 commits into from
May 22, 2019

Conversation

stevenroose
Copy link
Collaborator

@stevenroose stevenroose commented Apr 28, 2019

Builds on #40.

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

src/sha256.rs Outdated Show resolved Hide resolved
src/sha256.rs Outdated Show resolved Hide resolved
src/sha256.rs Outdated Show resolved Hide resolved
src/sha256.rs Outdated Show resolved Hide resolved
@apoelstra
Copy link
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
@@ -209,6 +209,20 @@ macro_rules! round(
);

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
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
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
Member

ACK except nit

@stevenroose
Copy link
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