package octez-protocol-018-Proxford-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=dbc3b675aee59c2c574e5d0a771193a2ecfca31e7a5bc5aed66598080596ce1c
sha512=b97ed762b9d24744305c358af0d20f394376b64bfdd758dd4a81775326caf445caa57c4f6445da3dd6468ff492de18e4c14af6f374dfcbb7e4d64b7b720e5e2a
doc/octez-protocol-018-Proxford-libs.test-helpers/Tezos_018_Proxford_test_helpers/Incremental/index.html
Module Tezos_018_Proxford_test_helpers.Incremental
Source
val begin_construction :
?timestamp:Tezos_base.TzPervasives.Time.Protocol.t ->
?seed_nonce_hash:Tezos_protocol_018_Proxford.Protocol.Nonce_hash.t ->
?mempool_mode:bool ->
?policy:Block.baker_policy ->
Block.t ->
incremental Tezos_base.TzPervasives.tzresult Lwt.t
begin_construction ?mempool_mode predecessor
uses Main.begin_validation_and_application
to create a validation and application state on top of predecessor
for the construction of a new block.
Optional arguments allow to override defaults:
?mempool_mode:bool
: whentrue
, usePartial_construction
mode. By default, it isfalse
and the mode isConstruction
.
val validate_operation :
?expect_failure:
(Tezos_base.TzPervasives.error list ->
unit Tezos_base.TzPervasives.tzresult Lwt.t) ->
?check_size:bool ->
incremental ->
Tezos_protocol_018_Proxford.Protocol.Alpha_context.Operation.packed ->
incremental Tezos_base.TzPervasives.tzresult Lwt.t
validate_operation ?expect_failure ?check_size i op
tries to validate op
in the validation state of i
. If the validation succeeds, the function returns the incremental value with a validation state updated after the validate. Otherwise raise the error from the validation of op
.
Optional arguments allow to override defaults:
?expect_failure:(error list -> unit tzresult Lwt.t)
: validation ofop
is expected to fail andexpect_failure
should handle the error. In case validate does not fail and anexpect_failure
is provided,validate_operation
fails.?check_size:bool
: enable the check that an operation size should not exceedConstants_repr.max_operation_data_length
. Enabled (set totrue
) by default.
val add_operation :
?expect_failure:
(Tezos_base.TzPervasives.error list ->
unit Tezos_base.TzPervasives.tzresult Lwt.t) ->
?expect_apply_failure:
(Tezos_base.TzPervasives.error list ->
unit Tezos_base.TzPervasives.tzresult Lwt.t) ->
?allow_manager_failure:bool ->
?check_size:bool ->
incremental ->
Tezos_protocol_018_Proxford.Protocol.Alpha_context.Operation.packed ->
incremental Tezos_base.TzPervasives.tzresult Lwt.t
add_operation ?expect_failure ?expect_apply_failure ?allow_manager_failure ?check_size i op
tries to validate then apply op
in the validation and application state of i
. If the validation of op
succeeds, the function returns the incremental value with a validation state updated after the application of op
. Otherwise raise the error from the validation of op
.
Optional arguments allow to override defaults:
finalize_block i
creates a Block.t
based on the protocol states and the operations contained in i
. The function calls Main.finalize_application
to compute a new context.
val assert_validate_operation_fails :
(Tezos_base.TzPervasives.tztrace ->
unit Tezos_base.TzPervasives.tzresult Lwt.t) ->
Tezos_protocol_018_Proxford.Protocol.Alpha_context.Operation.packed ->
Block.t ->
unit Tezos_base.TzPervasives.tzresult Lwt.t
assert_validate_operation_fails expect_failure operation block
calls begin_construction
on top of block
, then validate_operation
with ~expect_failure
.
val set_alpha_ctxt :
incremental ->
Tezos_protocol_018_Proxford.Protocol.Alpha_context.context ->
incremental