Alpha: fix error description

This commit is contained in:
Benjamin Canou 2018-06-28 14:26:46 +02:00
parent 43f818dc66
commit f946443b3b
2 changed files with 10 additions and 3 deletions

View File

@ -181,6 +181,11 @@ let report_errors ~details ~show_source ?parsed ppf errs =
Format.fprintf ppf "Ill typed contract."; Format.fprintf ppf "Ill typed contract.";
if rest <> [] then Format.fprintf ppf "@," ; if rest <> [] then Format.fprintf ppf "@," ;
print_trace (parsed_locations parsed) rest print_trace (parsed_locations parsed) rest
| Alpha_environment.Ecoproto_error Apply.Gas_quota_exceeded_init_deserialize :: rest ->
Format.fprintf ppf
"@[<v 0>Not enough gas to deserialize the operation.@,\
Injecting such a transaction could have you banned from mempools.@]" ;
print_trace locations rest
| Alpha_environment.Ecoproto_error (Missing_field prim) :: rest -> | Alpha_environment.Ecoproto_error (Missing_field prim) :: rest ->
Format.fprintf ppf "@[<v 0>Missing contract field: %s@]" Format.fprintf ppf "@[<v 0>Missing contract field: %s@]"
(Michelson_v1_primitives.string_of_prim prim) ; (Michelson_v1_primitives.string_of_prim prim) ;

View File

@ -323,9 +323,11 @@ let () =
register_error_kind register_error_kind
`Permanent `Permanent
~id:"gas_exhausted.init_deserialize" ~id:"gas_exhausted.init_deserialize"
~title:"Not enough gas for initial deserialization of parameters" ~title:"Not enough gas for initial deserialization of script expresions"
~description:"Gas quota was not enough to deserialize the transaction \ ~description:"Gas limit was not high enough to deserialize the \
parameters in precheck" transaction parameters or origination script code or \
initial storage, making the operation impossible to \
parse within the provided gas bounds."
Data_encoding.empty Data_encoding.empty
(function Gas_quota_exceeded_init_deserialize -> Some () | _ -> None) (function Gas_quota_exceeded_init_deserialize -> Some () | _ -> None)
(fun () -> Gas_quota_exceeded_init_deserialize) (fun () -> Gas_quota_exceeded_init_deserialize)