Page MenuHomePhabricator

[Chronik] Add `BlockHash` struct wrapping `Sha256d` to avoid mixing kinds of hashes
ClosedPublic

Authored by tobias_ruck on Jul 7 2022, 10:37.

Details

Summary

Unlike Sha256d, BlockHash has a well-defined byte-order (little-endian) and hex representation (big-endian), so we can implement TryFrom<&[u8]>, Display and FromStr.

Test Plan

ninja check-bitcoinsuite

Diff Detail

Repository
rABC Bitcoin ABC
Branch
chronik-blockhash
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 19587
Build 38893: Build Diffbuild-chronik
Build 38892: arc lint + arc unit