@Test void intToBytes32UInt64() { assertEquals( Bytes32.fromHexString("0x0000000000000000000000000000000000000000000000000000000000000000"), BeaconStateUtil.uint_to_bytes32(UInt64.ZERO)); assertEquals( Bytes32.fromHexString("0x0100000000000000000000000000000000000000000000000000000000000000"), BeaconStateUtil.uint_to_bytes32(UInt64.ONE)); assertEquals( Bytes32.fromHexString("0xffffffffffffffff000000000000000000000000000000000000000000000000"), BeaconStateUtil.uint_to_bytes32(UInt64.MAX_VALUE)); assertEquals( Bytes32.fromHexString("0xefcdab8967452301000000000000000000000000000000000000000000000000"), BeaconStateUtil.uint_to_bytes32(UInt64.valueOf(0x0123456789abcdefL))); }
public static Bytes32 uint_to_bytes32(long value) { return Bytes32.wrap(uint_to_bytes(value, 32)); }
BeaconStateUtil { public static Bytes32 uint_to_bytes32(long value) { return Bytes32.wrap(uint_to_bytes(value, 32)); } }
BeaconStateUtil { public static Bytes32 uint_to_bytes32(long value) { return Bytes32.wrap(uint_to_bytes(value, 32)); }  }
BeaconStateUtil { public static Bytes32 uint_to_bytes32(long value) { return Bytes32.wrap(uint_to_bytes(value, 32)); }  static BeaconState initialize_beacon_state_from_eth1(
      Bytes32 eth1_block_hash, UInt64 eth1_timestamp, List<? extends Deposit> deposits); static void process_deposit(MutableBeaconState state, Deposit deposit); static boolean is_valid_genesis_state(UInt64 genesisTime, int activeValidatorCount); static boolean isThereEnoughNumberOfValidators(int activeValidatorCount); static boolean isItMinGenesisTimeYet(final UInt64 genesisTime); static boolean is_valid_merkle_branch(
      Bytes32 leaf, SSZVector<Bytes32> branch, int depth, int index, Bytes32 root); static Bytes32 get_seed(BeaconState state, UInt64 epoch, Bytes4 domain_type); static UInt64 get_total_balance(BeaconState state, Collection<Integer> indices); static UInt64 get_total_active_balance(BeaconState state); static Pair<UInt64, UInt64> get_total_active_balance_with_root(BeaconState state); static Bytes32 compute_fork_data_root(
      Bytes4 current_version, Bytes32 genesis_validators_root); static Bytes4 compute_fork_digest(
      Bytes4 current_version, Bytes32 genesis_validators_root); static Bytes32 compute_domain(
      Bytes4 domain_type, Bytes4 fork_version, Bytes32 genesis_validators_root); static Bytes32 compute_domain(final Bytes4 domain_type, final Bytes32 fork_data_root); static Bytes32 compute_domain(Bytes4 domain_type); static Bytes compute_signing_root(Merkleizable object, Bytes32 domain); static Bytes compute_signing_root(long number, Bytes32 domain); static Bytes compute_signing_root(Bytes bytes, Bytes32 domain); static UInt64 compute_epoch_at_slot(UInt64 slot); static UInt64 get_previous_epoch(BeaconState state); static UInt64 get_current_epoch(BeaconState state); static UInt64 get_next_epoch(BeaconState state); static UInt64 compute_start_slot_at_epoch(UInt64 epoch); static void initiate_validator_exit(MutableBeaconState state, int index); static void slash_validator(
      MutableBeaconState state, int slashed_index, int whistleblower_index); static void slash_validator(MutableBeaconState state, int slashed_index); static Bytes32 get_block_root(BeaconState state, UInt64 epoch); static UInt64 get_committee_count_per_slot(BeaconState state, UInt64 epoch); static Bytes32 get_randao_mix(BeaconState state, UInt64 epoch); static int get_beacon_proposer_index(BeaconState state); static int get_beacon_proposer_index(BeaconState state, UInt64 requestedSlot); static Bytes32 get_domain(BeaconState state, Bytes4 domain_type, UInt64 message_epoch); static Bytes32 get_domain(
      final Bytes4 domain_type,
      final UInt64 epoch,
      final Fork fork,
      final Bytes32 genesis_validators_root); static Bytes32 get_domain(BeaconState state, Bytes4 domain_type); static UInt64 get_validator_churn_limit(BeaconState state); static UInt64 compute_activation_exit_epoch(UInt64 epoch); static boolean all(Bitvector bitvector, int start, int end); static UInt64 integer_squareroot(UInt64 n); static Bytes uint_to_bytes(long value, int numBytes); static Bytes32 uint_to_bytes32(long value); static Bytes32 uint_to_bytes32(UInt64 value); static long bytes_to_int64(Bytes data); static Bytes32 get_block_root_at_slot(BeaconState state, UInt64 slot); static boolean isBlockRootAvailableFromState(BeaconState state, UInt64 slot); }
BeaconStateUtil { public static Bytes32 uint_to_bytes32(long value) { return Bytes32.wrap(uint_to_bytes(value, 32)); }  static BeaconState initialize_beacon_state_from_eth1(
      Bytes32 eth1_block_hash, UInt64 eth1_timestamp, List<? extends Deposit> deposits); static void process_deposit(MutableBeaconState state, Deposit deposit); static boolean is_valid_genesis_state(UInt64 genesisTime, int activeValidatorCount); static boolean isThereEnoughNumberOfValidators(int activeValidatorCount); static boolean isItMinGenesisTimeYet(final UInt64 genesisTime); static boolean is_valid_merkle_branch(
      Bytes32 leaf, SSZVector<Bytes32> branch, int depth, int index, Bytes32 root); static Bytes32 get_seed(BeaconState state, UInt64 epoch, Bytes4 domain_type); static UInt64 get_total_balance(BeaconState state, Collection<Integer> indices); static UInt64 get_total_active_balance(BeaconState state); static Pair<UInt64, UInt64> get_total_active_balance_with_root(BeaconState state); static Bytes32 compute_fork_data_root(
      Bytes4 current_version, Bytes32 genesis_validators_root); static Bytes4 compute_fork_digest(
      Bytes4 current_version, Bytes32 genesis_validators_root); static Bytes32 compute_domain(
      Bytes4 domain_type, Bytes4 fork_version, Bytes32 genesis_validators_root); static Bytes32 compute_domain(final Bytes4 domain_type, final Bytes32 fork_data_root); static Bytes32 compute_domain(Bytes4 domain_type); static Bytes compute_signing_root(Merkleizable object, Bytes32 domain); static Bytes compute_signing_root(long number, Bytes32 domain); static Bytes compute_signing_root(Bytes bytes, Bytes32 domain); static UInt64 compute_epoch_at_slot(UInt64 slot); static UInt64 get_previous_epoch(BeaconState state); static UInt64 get_current_epoch(BeaconState state); static UInt64 get_next_epoch(BeaconState state); static UInt64 compute_start_slot_at_epoch(UInt64 epoch); static void initiate_validator_exit(MutableBeaconState state, int index); static void slash_validator(
      MutableBeaconState state, int slashed_index, int whistleblower_index); static void slash_validator(MutableBeaconState state, int slashed_index); static Bytes32 get_block_root(BeaconState state, UInt64 epoch); static UInt64 get_committee_count_per_slot(BeaconState state, UInt64 epoch); static Bytes32 get_randao_mix(BeaconState state, UInt64 epoch); static int get_beacon_proposer_index(BeaconState state); static int get_beacon_proposer_index(BeaconState state, UInt64 requestedSlot); static Bytes32 get_domain(BeaconState state, Bytes4 domain_type, UInt64 message_epoch); static Bytes32 get_domain(
      final Bytes4 domain_type,
      final UInt64 epoch,
      final Fork fork,
      final Bytes32 genesis_validators_root); static Bytes32 get_domain(BeaconState state, Bytes4 domain_type); static UInt64 get_validator_churn_limit(BeaconState state); static UInt64 compute_activation_exit_epoch(UInt64 epoch); static boolean all(Bitvector bitvector, int start, int end); static UInt64 integer_squareroot(UInt64 n); static Bytes uint_to_bytes(long value, int numBytes); static Bytes32 uint_to_bytes32(long value); static Bytes32 uint_to_bytes32(UInt64 value); static long bytes_to_int64(Bytes data); static Bytes32 get_block_root_at_slot(BeaconState state, UInt64 slot); static boolean isBlockRootAvailableFromState(BeaconState state, UInt64 slot); static boolean BLS_VERIFY_DEPOSIT; }