Skip to content
12 changes: 9 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ soldeer-core = { version = "=0.10.1", features = ["serde"] }
strum = "0.27"
tempfile = "3.23"
tokio = "1"
tokio-tungstenite = { version = "0.28", features = ["rustls-tls-webpki-roots"] }
tokio-tungstenite = { version = "0.29", features = ["rustls-tls-webpki-roots"] }
toml = "0.9"
toml_edit = "0.24"
tower = "0.5"
Expand Down
4 changes: 3 additions & 1 deletion crates/anvil/server/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ pub async fn handle_request<Handler: RpcHandler>(
Request::Single(call) => handle_call(call, handler).await.map(Response::Single),
Request::Batch(calls) => {
if calls.is_empty() {
return Some(Response::error(RpcError::invalid_request()));
return Some(Response::Batch(vec![anvil_rpc::response::RpcResponse::from(
RpcError::invalid_request(),
)]));
}
future::join_all(calls.into_iter().map(move |call| handle_call(call, handler.clone())))
.map(responses_as_batch)
Expand Down
Loading