Skip to content

Commit b5de925

Browse files
authored
Use JSON header by default for /eth/v1/beacon/deposit_snapshot (#5813)
* Fix with or * Flip case
1 parent 8006418 commit b5de925

File tree

1 file changed

+8
-8
lines changed
  • beacon_node/http_api/src

1 file changed

+8
-8
lines changed

beacon_node/http_api/src/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2121,14 +2121,7 @@ pub fn serve<T: BeaconChainTypes>(
21212121
task_spawner: TaskSpawner<T::EthSpec>,
21222122
eth1_service: eth1::Service| {
21232123
task_spawner.blocking_response_task(Priority::P1, move || match accept_header {
2124-
Some(api_types::Accept::Json) | None => {
2125-
let snapshot = eth1_service.get_deposit_snapshot();
2126-
Ok(
2127-
warp::reply::json(&api_types::GenericResponse::from(snapshot))
2128-
.into_response(),
2129-
)
2130-
}
2131-
_ => eth1_service
2124+
Some(api_types::Accept::Ssz) => eth1_service
21322125
.get_deposit_snapshot()
21332126
.map(|snapshot| {
21342127
Response::builder()
@@ -2154,6 +2147,13 @@ pub fn serve<T: BeaconChainTypes>(
21542147
))
21552148
})
21562149
}),
2150+
_ => {
2151+
let snapshot = eth1_service.get_deposit_snapshot();
2152+
Ok(
2153+
warp::reply::json(&api_types::GenericResponse::from(snapshot))
2154+
.into_response(),
2155+
)
2156+
}
21572157
})
21582158
},
21592159
);

0 commit comments

Comments
 (0)