HomePhabricator

[Chronik] Protobuf & HTTP error response handling

Description

[Chronik] Protobuf & HTTP error response handling

Summary:
Add two structs:

  1. Protobuf, an extractor and response type for specific protobuf messages.
  2. ReportError, a newtype around Report, which can be turned into an HTTP response.

Also add chronik.proto (currently containing only Error) + prost protobuf building using build.rs.

Depends on D13203.

Test Plan: cargo test

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

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

Details

Provenance
tobias_ruckAuthored on Feb 28 2023, 19:18
tobias_ruckPushed on Mar 1 2023, 14:04
Reviewer
Restricted Project
Differential Revision
D13204: [Chronik] Protobuf & HTTP error response handling
Parents
rABCac03125b394b: [Chronik] Move `HashToArray` to util/hash.cpp/h
Branches
Unknown
Tags
Unknown

Event Timeline

Unknown Object (User) added a subscriber: Unknown Object (User).Mar 1 2023, 16:26
Unknown Object (User) removed a subscriber: Unknown Object (User).
Unknown Object (User) added a subscriber: Unknown Object (User).