HomePhabricator

[Chronik] Add fallible `Hashed` methods for parsing byte slices and hex string

Description

[Chronik] Add fallible Hashed methods for parsing byte slices and hex string

Summary:
Parsing hashes from byte slices and hex strings is fallible, add methods that parse them with proper error handling.

Errors are provided through thiserror, which builds us an error enum with Display implementations.

Test Plan: ninja check-bitcoinsuite

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D11715

Details

Provenance
tobias_ruckAuthored on Jul 5 2022, 20:18
tobias_ruckPushed on Jul 7 2022, 09:59
Reviewer
Restricted Project
Differential Revision
D11715: [Chronik] Add fallible `Hashed` methods for parsing byte slices and hex string
Parents
rABC7a5d16e0e985: [Automated] Update timing.json
Branches
Unknown
Tags
Unknown