Client/Baker: improve logging.
This commit is contained in:
parent
f77a2544cc
commit
9a0ac6b837
@ -27,13 +27,19 @@ type Error_monad.error += Bad_revelation
|
|||||||
let forge_seed_nonce_revelation
|
let forge_seed_nonce_revelation
|
||||||
(cctxt: Client_commands.context)
|
(cctxt: Client_commands.context)
|
||||||
block ?(force = false) nonces =
|
block ?(force = false) nonces =
|
||||||
|
Client_node_rpcs.Blocks.hash cctxt block >>= fun hash ->
|
||||||
match nonces with
|
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 ()
|
return ()
|
||||||
| _ ->
|
| _ ->
|
||||||
inject_seed_nonce_revelation cctxt
|
inject_seed_nonce_revelation cctxt
|
||||||
block ~force ~wait:true nonces >>=? fun oph ->
|
block ~force ~wait:true nonces >>=? fun oph ->
|
||||||
cctxt.answer "Operation successfully injected in the node." >>= fun () ->
|
cctxt.answer
|
||||||
cctxt.answer "Operation hash is '%a'." Operation_hash.pp_short oph >>= fun () ->
|
"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 ()
|
return ()
|
||||||
|
Loading…
Reference in New Issue
Block a user