Skip to content

Commit

Permalink
dbg
Browse files Browse the repository at this point in the history
  • Loading branch information
pkhry committed Sep 26, 2022
1 parent 0eb3f6c commit 786cf43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/vm_library/src/pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ impl IO {
serde_json::from_slice(&buf[..]).expect("failed to parse client_message")
}
pub fn write(&mut self, msg: &ServerMessage) {
let msg = serde_json::to_string(msg).expect("Failed to write to pipe");
let msg = serde_json::to_vec(msg).expect("Failed to write to pipe");
self.writer
.write_all(&usize::to_ne_bytes(msg.len()))
.expect("Failed to write to pipe");
self.writer
.write_all(msg.as_bytes())
.write_all(&msg)
.expect("Failed to write to pipe");
self.writer.flush().expect("Failed to write to pipe")
}
Expand Down
1 change: 0 additions & 1 deletion crates/vm_library/src/run_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ fn handle_transaction(
mut gas_limit: u64,
) -> VMResult<u64> {
let io = &mut context.io;
println!("{:?}", transaction.operation);
if let Ok(op) = serde_json::from_str(&transaction.operation) {
match op {
Operation::Invoke {
Expand Down

0 comments on commit 786cf43

Please sign in to comment.