diff --git a/src/proto_alpha/lib_client/injection.ml b/src/proto_alpha/lib_client/injection.ml index b02bcb69a..b84562c92 100644 --- a/src/proto_alpha/lib_client/injection.ml +++ b/src/proto_alpha/lib_client/injection.ml @@ -377,7 +377,13 @@ let inject_operation cctxt#message "Operation hash: %a" Operation_hash.pp oph >>= fun () -> begin match confirmations with - | None -> return result + | None -> + cctxt#message "@[NOT waiting for the operation to be included.@,\ + Use command@,\ + \ tezos-client wait for %a to be included --confirmations 30@,\ + and/or an external block explorer to make sure that it has been included.@]" + Operation_hash.pp oph >>= fun () -> + return result | Some confirmations -> cctxt#message "Waiting for the operation to be included..." >>= fun () -> Client_confirmations.wait_for_operation_inclusion @@ -405,6 +411,22 @@ let inject_operation "New contract %a originated." Contract.pp c) contracts >>= fun () -> + begin match confirmations with + | None -> Lwt.return_unit + | Some number -> + if number >= 30 then + cctxt#message + "The operation was included in a block %d blocks ago." + number + else + cctxt#message + "@[The operation has only been included %d blocks ago.@,\ + We recommend to wait more.@,\ + Use command@,\ + \ tezos-client wait for %a to be included --confirmations 30@,\ + and/or an external block explorer.@]" + number Operation_hash.pp oph + end >>= fun () -> return (oph, op.protocol_data.contents, result.contents) let inject_manager_operation