From 9a0ac6b837f762d6dd0448025d1d5e55447678df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Tue, 14 Feb 2017 12:24:56 +0100 Subject: [PATCH] Client/Baker: improve logging. --- .../bootstrap/baker/client_mining_revelation.ml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/client/embedded/bootstrap/baker/client_mining_revelation.ml b/src/client/embedded/bootstrap/baker/client_mining_revelation.ml index 7548e4372..a2fd5cc9b 100644 --- a/src/client/embedded/bootstrap/baker/client_mining_revelation.ml +++ b/src/client/embedded/bootstrap/baker/client_mining_revelation.ml @@ -27,13 +27,19 @@ type Error_monad.error += Bad_revelation let forge_seed_nonce_revelation (cctxt: Client_commands.context) block ?(force = false) nonces = + Client_node_rpcs.Blocks.hash cctxt block >>= fun hash -> match nonces with | [] -> - cctxt.message "No nonce to reveal" >>= fun () -> + cctxt.message "No nonce to reveal for block %a" + Block_hash.pp_short hash >>= fun () -> return () | _ -> inject_seed_nonce_revelation cctxt block ~force ~wait:true nonces >>=? fun oph -> - cctxt.answer "Operation successfully injected in the node." >>= fun () -> - cctxt.answer "Operation hash is '%a'." Operation_hash.pp_short oph >>= fun () -> + cctxt.answer + "Operation successfully injected %d revelation(s) for %a." + (List.length nonces) + Block_hash.pp_short hash >>= fun () -> + cctxt.answer "Operation hash is '%a'." + Operation_hash.pp_short oph >>= fun () -> return ()