ligo/src/proto/alpha/main.ml

41 lines
1.4 KiB
OCaml
Raw Normal View History

2016-09-08 21:13:10 +04:00
(**************************************************************************)
(* *)
(* Copyright (c) 2014 - 2016. *)
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* *)
(* All rights reserved. No warranty, explicit or implicit, provided. *)
(* *)
(**************************************************************************)
(* Tezos Protocol Implementation - Protocol Signature Instance *)
type operation = Tezos_context.operation
let parse_operation = Tezos_context.Operation.parse
let max_operation_data_length =
Tezos_context.Operation.max_operation_data_length
2016-10-19 22:47:04 +04:00
type block =
{ header : Tezos_context.Block.header ;
pred_timestamp : Time.t }
2016-09-08 21:13:10 +04:00
let parse_block raw_header pred_timestamp =
Tezos_context.Block.parse_header raw_header >>? fun header ->
Ok { header ; pred_timestamp }
2016-09-08 21:13:10 +04:00
let max_number_of_operations =
Tezos_context.Constants.max_number_of_operations
2016-10-19 22:47:04 +04:00
let max_block_length =
2016-09-08 21:13:10 +04:00
Tezos_context.Block.max_header_length
let rpc_services = Services_registration.rpc_services
let apply ctxt block ops =
Apply.apply ctxt true block.header block.pred_timestamp ops
2016-09-08 21:13:10 +04:00
let preapply = Apply.preapply
let configure_sandbox = Tezos_context.configure_sandbox