Skip to content

refactor: genesis_hash to use built-in bitcoin method#1

Open
Olexandr88 wants to merge 1 commit into
PsyProtocol:mainfrom
Olexandr88:patch-1
Open

refactor: genesis_hash to use built-in bitcoin method#1
Olexandr88 wants to merge 1 commit into
PsyProtocol:mainfrom
Olexandr88:patch-1

Conversation

@Olexandr88
Copy link
Copy Markdown

Replace hardcoded genesis block hashes with bitcoin crate built-in bitcoin::blockdata::constants::genesis_block().

Previous implementation had Bitcoin and Signet hashes as exact byte-reversals of each other an endianness bug. Using the crate's own method eliminates this entirely.

Also removes bitcoin_genesis_hash() and unused Hash import.

Refactor genesis_hash function to use bitcoin's built-in method for retrieving the genesis block hash instead of a custom implementation.
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.

1 participant