Skip to content

Commit

Permalink
chore: rabbit review
Browse files Browse the repository at this point in the history
  • Loading branch information
merklefruit committed Jul 17, 2024
1 parent 0002ce4 commit 8940909
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions bolt-sidecar/bin/sidecar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,13 @@ async fn main() -> eyre::Result<()> {
"Validation against execution state passed"
);

// TODO: review all this `clone` usage

// parse the request into constraints and sign them with the sidecar signer
let message = ConstraintsMessage::build(validator_index, request.clone());
let slot = request.slot;
let message = ConstraintsMessage::build(validator_index, request);
let signature = signer.sign(&message.digest())?.to_string();
let signed_constraints = SignedConstraints { message, signature };

execution_state.add_constraint(request.slot, signed_constraints.clone());
execution_state.add_constraint(slot, signed_constraints.clone());

let res = serde_json::to_value(signed_constraints).map_err(Into::into);
let _ = response_tx.send(res).ok();
Expand Down Expand Up @@ -142,7 +141,6 @@ async fn main() -> eyre::Result<()> {
}
}


if let Err(e) = local_builder.build_new_local_payload(&template).await {
tracing::error!(err = ?e, "CRITICAL: Error while building local payload at slot deadline for {slot}");
};
Expand Down
2 changes: 1 addition & 1 deletion bolt-sidecar/src/client/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ mod tests {

#[tokio::test]
async fn test_smart_contract_code() -> eyre::Result<()> {
let rpc_url = Url::parse("https://cloudflare-eth.com")?;
let rpc_url = Url::parse(std::env::var("RPC_URL").unwrap().as_str())?;
let rpc_client = RpcClient::new(rpc_url);

// random deployed smart contract address
Expand Down

0 comments on commit 8940909

Please sign in to comment.