go-ethereum: github.com/axiomzen/go-ethereum/consensus/misc Index | Files

package misc

import "github.com/axiomzen/go-ethereum/consensus/misc"

Index

Package Files

dao.go forks.go

Variables

var (
    // ErrBadProDAOExtra is returned if a header doens't support the DAO fork on a
    // pro-fork client.
    ErrBadProDAOExtra = errors.New("bad DAO pro-fork extra-data")

    // ErrBadNoDAOExtra is returned if a header does support the DAO fork on a no-
    // fork client.
    ErrBadNoDAOExtra = errors.New("bad DAO no-fork extra-data")
)

func ApplyDAOHardFork Uses

func ApplyDAOHardFork(statedb *state.StateDB)

ApplyDAOHardFork modifies the state database according to the DAO hard-fork rules, transferring all balances of a set of DAO accounts to a single refund contract.

func VerifyDAOHeaderExtraData Uses

func VerifyDAOHeaderExtraData(config *params.ChainConfig, header *types.Header) error

VerifyDAOHeaderExtraData validates the extra-data field of a block header to ensure it conforms to DAO hard-fork rules.

DAO hard-fork extension to the header validity:

a) if the node is no-fork, do not accept blocks in the [fork, fork+10) range
   with the fork specific extra-data set
b) if the node is pro-fork, require blocks in the specific range to have the
   unique extra-data set.

func VerifyForkHashes Uses

func VerifyForkHashes(config *params.ChainConfig, header *types.Header, uncle bool) error

VerifyForkHashes verifies that blocks conforming to network hard-forks do have the correct hashes, to avoid clients going off on different chains. This is an optional feature.

Package misc imports 8 packages (graph). Updated 2019-07-06. Refresh now. Tools for package owners.