Tezos_alpha_test_helpers.State
type double_signing_state = {
culprit : Tezos_alpha_test_helpers.Signature.Public_key_hash.t;
evidence : Context.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation;
denounced : bool;
misbehaviour : Tezos_protocol_alpha.Protocol.Misbehaviour_repr.t;
}
type t = {
account_map : State_account.account_map;
total_supply : Tezos_alpha_test_helpers.State_account.Tez.t;
constants : Tezos_protocol_alpha.Protocol.Alpha_context.Constants.Parametric.t;
param_requests : (string * Adaptive_issuance_helpers.staking_parameters * int)
list;
force_ai_vote_yes : bool;
baking_policy : Block.baker_policy option;
payload_round : int option;
last_level_rewards : Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t;
snapshot_balances : (string * State_account.balance) list
Tezos_base.TzPervasives.String.Map.t;
saved_rate : Q.t option;
burn_rewards : bool;
pending_operations : Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation
list;
pending_batch : Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation
list;
source_batch : string option;
pending_slashes : (Tezos_alpha_test_helpers.Signature.Public_key_hash.t
* Tezos_protocol_alpha.Protocol.Denunciations_repr.item)
list;
double_signings : double_signing_state list;
force_attest_all : bool;
force_preattest_all : bool;
check_finalized_every_block : (Block.full_metadata ->
(Block.t * t) ->
unit Tezos_base.TzPervasives.tzresult Lwt.t)
list;
check_finalized_current_block : (Block.full_metadata ->
(Block.t * t) ->
unit Tezos_base.TzPervasives.tzresult Lwt.t)
list;
previous_metadata : Block.full_metadata option;
operation_mode : operation_mode;
grandparent : Block.t;
}
Type of the state
val param_wait : t -> int
Expected number of cycles before staking parameters get applied
val unstake_wait : t -> int
Expected number of cycles before staking unstaked funds get unfrozen
val find_account : string -> t -> State_account.account_state
From a name, returns the corresponding account
val find_account_from_pkh :
Signature.public_key_hash ->
t ->
string * State_account.account_state
val get_delegates_of :
name:Tezos_base.TzPervasives.String.t ->
t ->
State_account.account_state list
val get_stakers_of :
name:Tezos_base.TzPervasives.String.t ->
t ->
State_account.account_state list
val liquid_delegated :
name:Tezos_base.TzPervasives.String.t ->
t ->
(Tezos_alpha_test_helpers.State_account.Tez.t,
Tezos_base.TzPervasives.tztrace)
Stdlib.result
val is_self_delegate : string -> t -> bool
Returns true iff account is a delegate
val update_map :
?log_updates:Tezos_base.TzPervasives.String.t list ->
f:(State_account.account_map -> State_account.account_map) ->
t ->
t
val update_map_es :
?log_updates:Tezos_base.TzPervasives.String.t list ->
f:
(State_account.account_map ->
State_account.account_map Tezos_base.TzPervasives.tzresult Lwt.t) ->
t ->
t Tezos_base.TzPervasives.tzresult Lwt.t
val apply_burn :
Tezos_alpha_test_helpers.State_account.Tez.t ->
Tezos_base.TzPervasives.String.Map.key ->
t ->
t
val apply_transfer :
Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
Tezos_base.TzPervasives.String.Map.key ->
Tezos_base.TzPervasives.String.Map.key ->
t ->
t
val apply_unstake :
Tezos_protocol_alpha.Protocol.Alpha_context.Cycle.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t ->
Tezos_base.TzPervasives.String.Map.key ->
t ->
t
val apply_finalize : Tezos_base.TzPervasives.String.Map.key -> t -> t
val apply_unslashable :
Tezos_alpha_test_helpers.State_account.Cycle.cycle ->
Tezos_base.TzPervasives.String.Map.key ->
t ->
t
val apply_unslashable_for_all :
Tezos_alpha_test_helpers.State_account.Cycle.cycle ->
t ->
t
val apply_rewards :
baker:string ->
Block.t ->
t ->
t Tezos_base.TzPervasives.tzresult Lwt.t
val update_account : string -> State_account.account_state -> t -> t
Given an account name and new account state, updates state
accordingly Preferably use other specific update functions
val update_account_f :
string ->
(State_account.account_state -> State_account.account_state) ->
t ->
t
val apply_update_consensus_key :
string ->
Tezos_protocol_alpha.Protocol.Alpha_context.Cycle.cycle ->
Signature.public_key_hash ->
t ->
t
val apply_update_companion_key :
string ->
Tezos_protocol_alpha.Protocol.Alpha_context.Cycle.cycle ->
Signature.public_key_hash ->
t ->
t
val add_pending_operations :
Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation list ->
t ->
t
val pop_pending_operations :
t ->
t * Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation list
val add_pending_batch :
Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation list ->
t ->
t
val add_current_block_check :
(Block.full_metadata ->
(Block.t * t) ->
unit Tezos_base.TzPervasives.tzresult Lwt.t) ->
t ->
t