Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/electrum/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ impl Connection {
"port": self.addr.port(),
}),
);
println!("ELECTRUM-RPC-LOGGER: {}", log);
println!("{}", log);
}

fn send_values(&mut self, values: &[Value]) -> Result<()> {
Expand All @@ -527,6 +527,7 @@ impl Connection {
let empty_params = json!([]);
loop {
let msg = self.chan.receiver().recv().chain_err(|| "channel closed")?;
let start_time = Instant::now();
trace!("RPC {:?}", msg);
match msg {
Message::Request(line) => {
Expand Down Expand Up @@ -555,7 +556,6 @@ impl Connection {
})
);

let start_time = Instant::now();
let reply = self.handle_command(method, params, id)?;

conditionally_log_rpc_event!(
Expand All @@ -564,7 +564,7 @@ impl Connection {
"event": "rpc response",
"method": method,
"payload_size": reply.to_string().as_bytes().len(),
"duration_µs": start_time.elapsed().as_micros(),
"duration_micros": start_time.elapsed().as_micros(),
"id": id,
})
);
Expand Down