File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -911,6 +911,16 @@ let liquid_balance_at_slot ~global_slot (account : t) =
911911 ~vesting_period ~vesting_increment ~initial_minimum_balance ) )
912912 |> Option. value_exn
913913
914+ (* * Apply the vesting parameter update to an account's timing information. See
915+ [Timing.Slot_reduction_update] for usage notes. *)
916+ let slot_reduction_update ~hardfork_slot (account : t ) =
917+ let timing =
918+ account.timing |> Timing. to_record
919+ |> Timing. slot_reduction_update ~hardfork_slot
920+ |> Timing. of_record
921+ in
922+ { account with timing }
923+
914924let gen : t Quickcheck.Generator.t =
915925 let open Quickcheck.Let_syntax in
916926 let % bind public_key = Public_key.Compressed. gen in
Original file line number Diff line number Diff line change 516516 if the account is not actively vesting at [hardfork_slot]. See the
517517 [Slot_reduction_update] module documentation for general usage notes. *)
518518let slot_reduction_update ~hardfork_slot (t : as_record ) =
519- Slot_reduction_update. (
520- t |> of_record |> hardfork_adjustment ~hardfork_slot |> to_record)
519+ if t.is_timed then
520+ Slot_reduction_update. (
521+ t |> of_record |> hardfork_adjustment ~hardfork_slot |> to_record)
522+ else t
You can’t perform that action at this time.
0 commit comments