package tezos-protocol-020-PsParisC
Tezos protocol 020-PsParisC package
Install
Dune Dependency
Authors
Maintainers
Sources
tezos-octez-v20.1.tag.bz2
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/src/tezos_raw_protocol_020_PsParisC/misbehaviour_repr.ml.html
Source file misbehaviour_repr.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
(*****************************************************************************) (* *) (* SPDX-License-Identifier: MIT *) (* Copyright (c) 2023 Nomadic Labs, <contact@nomadic-labs.com> *) (* *) (*****************************************************************************) type kind = Double_baking | Double_attesting | Double_preattesting let kind_encoding = let open Data_encoding in string_enum [ ("preattestation", Double_preattesting); ("attestation", Double_attesting); ("block", Double_baking); ] type t = {level : Raw_level_repr.t; round : Round_repr.t; kind : kind} let compare_kind a b = let to_int = function | Double_baking -> 0 | Double_attesting -> 1 | Double_preattesting -> 2 in Compare.Int.compare (to_int a) (to_int b) let equal_kind a b = Compare.Int.equal 0 (compare_kind a b) let compare a b = Compare.or_else (Raw_level_repr.compare a.level b.level) @@ fun () -> Compare.or_else (Round_repr.compare a.round b.round) @@ fun () -> compare_kind a.kind b.kind let encoding = let open Data_encoding in conv (fun {level; round; kind} -> (level, round, kind)) (fun (level, round, kind) -> {level; round; kind}) (obj3 (req "level" Raw_level_repr.encoding) (req "round" Round_repr.encoding) (req "kind" kind_encoding))
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>