Module Tezos_024_PsU87LFi_test_helpers.State

type operation_mode =
  1. | Batch
  2. | Wait
  3. | Bake
type t = {
  1. account_map : State_account.account_map;
  2. total_supply : Tezos_024_PsU87LFi_test_helpers.State_account.Tez.t;
  3. constants : Tezos_protocol_024_PsU87LFi.Protocol.Alpha_context.Constants.Parametric.t;
  4. param_requests : (string * Adaptive_issuance_helpers.staking_parameters * int) list;
  5. baking_policy : Block.baker_policy option;
  6. payload_round : int option;
  7. last_level_rewards : Tezos_protocol_024_PsU87LFi.Protocol.Alpha_context.Raw_level.t;
  8. snapshot_balances : (string * State_account.balance) list Tezos_base.TzPervasives.String.Map.t;
  9. saved_rate : Q.t option;
  10. burn_rewards : bool;
  11. pending_operations : Tezos_protocol_024_PsU87LFi.Protocol.Alpha_context.packed_operation list;
  12. pending_batch : Tezos_protocol_024_PsU87LFi.Protocol.Alpha_context.packed_operation list;
  13. source_batch : string option;
  14. pending_slashes : (Tezos_024_PsU87LFi_test_helpers.Signature.Public_key_hash.t * Tezos_protocol_024_PsU87LFi.Protocol.Denunciations_repr.item) list;
  15. double_signings : double_signing_state list;
  16. force_attest_all : bool;
  17. force_preattest_all : bool;
  18. check_finalized_every_block : (Block.full_metadata -> (Block.t * t) -> unit Tezos_base.TzPervasives.tzresult Lwt.t) list;
  19. check_finalized_current_block : (Block.full_metadata -> (Block.t * t) -> unit Tezos_base.TzPervasives.tzresult Lwt.t) list;
  20. previous_metadata : Block.full_metadata option;
  21. operation_mode : operation_mode;
  22. 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 is_self_delegate : string -> t -> bool

Returns true iff account is a delegate

val apply_finalize : Tezos_base.TzPervasives.String.Map.key -> t -> t
val apply_unslashable_for_all : Tezos_024_PsU87LFi_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 update_delegate : string -> string option -> t -> t
val add_current_block_check : (Block.full_metadata -> (Block.t * t) -> unit Tezos_base.TzPervasives.tzresult Lwt.t) -> t -> t