Client: warning to wait 30 blocks for confirmation
This commit is contained in:
parent
9ee7cf18fd
commit
797b26c16c
@ -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 "@[<v 0>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
|
||||
"@[<v 0>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
|
||||
|
Loading…
Reference in New Issue
Block a user