2016-10-20 20:54:16 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
2017-11-14 03:36:14 +04:00
|
|
|
(* Copyright (c) 2014 - 2017. *)
|
2016-10-20 20:54:16 +04:00
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
|
|
|
type 'error preapply_result = {
|
2017-11-14 02:27:19 +04:00
|
|
|
applied: (Operation_hash.t * Operation.t) list;
|
|
|
|
refused: (Operation.t * 'error list) Operation_hash.Map.t;
|
2016-10-20 20:54:16 +04:00
|
|
|
(* e.g. invalid signature *)
|
2017-11-14 02:27:19 +04:00
|
|
|
branch_refused: (Operation.t * 'error list) Operation_hash.Map.t;
|
2016-10-20 20:54:16 +04:00
|
|
|
(* e.g. insufficent balance *)
|
2017-11-14 02:27:19 +04:00
|
|
|
branch_delayed: (Operation.t * 'error list) Operation_hash.Map.t;
|
2016-10-20 20:54:16 +04:00
|
|
|
(* e.g. timestamp in the future *)
|
|
|
|
}
|
|
|
|
|
|
|
|
val empty_result : 'error preapply_result
|
|
|
|
|
|
|
|
val preapply_result_operations :
|
2017-11-14 02:27:19 +04:00
|
|
|
'error preapply_result -> Operation.t Operation_hash.Map.t
|
2016-10-20 20:54:16 +04:00
|
|
|
|
|
|
|
val preapply_result_encoding :
|
|
|
|
'error list Data_encoding.t ->
|
|
|
|
'error preapply_result Data_encoding.t
|
|
|
|
|
|
|
|
type prevalidation_state
|
|
|
|
|
|
|
|
val start_prevalidation :
|
2017-04-27 03:01:05 +04:00
|
|
|
?proto_header: MBytes.t ->
|
2017-11-19 18:15:03 +04:00
|
|
|
?max_number_of_operations: int ->
|
2017-04-19 23:46:10 +04:00
|
|
|
predecessor: State.Block.t ->
|
2016-10-20 20:54:16 +04:00
|
|
|
timestamp: Time.t ->
|
2017-04-27 03:01:05 +04:00
|
|
|
unit -> prevalidation_state tzresult Lwt.t
|
2016-10-20 20:54:16 +04:00
|
|
|
|
|
|
|
val prevalidate :
|
|
|
|
prevalidation_state -> sort:bool ->
|
2017-04-19 21:21:23 +04:00
|
|
|
(Operation_hash.t * Operation.t) list ->
|
2017-04-27 03:01:05 +04:00
|
|
|
(prevalidation_state * error preapply_result) Lwt.t
|
2016-10-20 20:54:16 +04:00
|
|
|
|
|
|
|
val end_prevalidation :
|
2017-04-10 14:14:11 +04:00
|
|
|
prevalidation_state -> Updater.validation_result tzresult Lwt.t
|