Skip to content

Commit

Permalink
fixup! fix: rollup-http-server and rollup util
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmikhalevich committed May 23, 2024
1 parent 6942b71 commit 384b916
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 2 additions & 1 deletion rollup-http/rollup-http-server/src/http_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ async fn finish(finish: Json<FinishRequest>, data: Data<Mutex<Context>>) -> Http
let context = data.lock().await;
let rollup_fd = context.rollup_fd.lock().await;
// Write finish request, read indicator for next request
let new_rollup_request = match rollup::perform_rollup_finish_request(&*rollup_fd, accept).await {
let new_rollup_request = match rollup::perform_rollup_finish_request(&*rollup_fd, accept).await
{
Ok(finish_request) => {
// Received new request, process it
log::info!(
Expand Down
12 changes: 5 additions & 7 deletions rollup-http/rollup-http-server/tests/rollup-http-server-tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ async fn test_finish_request(
context_future: impl Future<Output = Context>,
) -> Result<(), Box<dyn std::error::Error>> {
/*
* cast calldata "EvmAdvance(uint256,address,address,uint256,uint256,uint256,bytes)" \
* cast calldata "EvmAdvance(uint256,address,address,uint256,uint256,uint256,uint256,bytes)" \
* 0x0000000000000000000000000000000000000001 \
* 0x0000000000000000000000000000000000000002 \
* 0x0000000000000000000000000000000000000003 \
Expand All @@ -130,14 +130,15 @@ async fn test_finish_request(
* 0x`echo "advance-0" | xxd -p -c0`
*/
let advance_payload_field = "advance-0\n"; // must match `cast` invocation!
let advance_payload_data = "cc7dee1f\
let advance_payload_data = "415bf363\
0000000000000000000000000000000000000000000000000000000000000001\
0000000000000000000000000000000000000000000000000000000000000002\
0000000000000000000000000000000000000000000000000000000000000003\
0000000000000000000000000000000000000000000000000000000000000004\
0000000000000000000000000000000000000000000000000000000000000005\
0000000000000000000000000000000000000000000000000000000000000006\
00000000000000000000000000000000000000000000000000000000000000e0\
0000000000000000000000000000000000000000000000000000000000000007\
0000000000000000000000000000000000000000000000000000000000000100\
000000000000000000000000000000000000000000000000000000000000000a\
616476616e63652d300a00000000000000000000000000000000000000000000";

Expand Down Expand Up @@ -378,10 +379,7 @@ async fn test_exception_throw(
//Read text file with results
let exception =
std::fs::read("none.exception-0.bin").expect("error reading test exception file");
assert_eq!(
String::from_utf8(exception).unwrap(),
contents,
);
assert_eq!(String::from_utf8(exception).unwrap(), contents,);
println!("Removing exception text file");
std::fs::remove_file("none.exception-0.bin")?;
Ok(())
Expand Down

0 comments on commit 384b916

Please sign in to comment.