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
Lint
Lint Not Applicable
Unit
Tests Not Applicable