Clean up blockv3 metadata and client (#5015)

* Improve block production v3 client

* Delete wayward line

* Overhaul JSON endpoint as well

* Rename timeout param

* Update tests

* I broke everything

* Ah this is an insane fix

* Remove unnecessary optionals

* Doc fix
This commit is contained in:
Michael Sproul
2023-12-23 01:39:17 +11:00
committed by GitHub
parent a7e5926a1f
commit af11e78ae1
12 changed files with 451 additions and 324 deletions

View File

@@ -335,8 +335,9 @@ pub fn serve<E: EthSpec>(
.el
.get_payload_by_root(&root)
.ok_or_else(|| reject("missing payload for tx root"))?;
let resp = ForkVersionedResponse {
let resp: ForkVersionedResponse<_> = ForkVersionedResponse {
version: Some(fork_name),
metadata: Default::default(),
data: payload,
};
@@ -616,8 +617,9 @@ pub fn serve<E: EthSpec>(
.spec
.fork_name_at_epoch(slot.epoch(E::slots_per_epoch()));
let signed_bid = SignedBuilderBid { message, signature };
let resp = ForkVersionedResponse {
let resp: ForkVersionedResponse<_> = ForkVersionedResponse {
version: Some(fork_name),
metadata: Default::default(),
data: signed_bid,
};
let json_bid = serde_json::to_string(&resp)