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: 0

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