util

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2019 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFakeAttestations

func GenerateFakeAttestations(s *primitives.State, b *beacon.Blockchain, keys validator.Keystore) ([]primitives.Attestation, error)

GenerateFakeAttestations generates a bunch of fake attestations.

func MineBlockWithFullAttestations

func MineBlockWithFullAttestations(b *beacon.Blockchain, keystore validator.Keystore, proposerIndex uint32) (*primitives.Block, error)

MineBlockWithFullAttestations generates attestations to include in a block and mines it.

func MineBlockWithSpecialsAndAttestations

func MineBlockWithSpecialsAndAttestations(b *beacon.Blockchain, attestations []primitives.Attestation, proposerSlashings []primitives.ProposerSlashing, casperSlashings []primitives.CasperSlashing, deposits []primitives.Deposit, exits []primitives.Exit, k validator.Keystore, proposerIndex uint32) (*primitives.Block, error)

MineBlockWithSpecialsAndAttestations mines a block with the given specials and attestations.

func SetBit

func SetBit(bitfield []byte, id uint32) ([]byte, error)

SetBit sets a bit in a bitfield.

func SetupBlockchain

func SetupBlockchain(initialValidators int, c *config.Config) (*beacon.Blockchain, validator.Keystore, error)

SetupBlockchain sets up a blockchain with a certain number of initial validators

func SetupBlockchainWithTime

func SetupBlockchainWithTime(initialValidators int, c *config.Config, genesisTime time.Time) (*beacon.Blockchain, validator.Keystore, error)

SetupBlockchainWithTime sets up a blockchain with a certain number of initial validators and genesis time

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL