Versions in this module Expand all Collapse all v0 v0.1.0 Jul 23, 2018 Changes in this version + var ErrBlockHeightZero = errors.New("block should have height higher than 0") + var ErrEmptyTx = errors.New("tx is empty") + var ErrInvalidMerkleRoot = errors.New("invalid merkle root") + var ErrInvalidMinerReward = errors.New("miner reward is invalid") + var ErrInvalidTxRecipient = errors.New("invalid tx recipient") + var ErrInvalidTxSender = errors.New("invalid tx sender") + var ErrInvalidTxSignature = errors.New("invalid tx signature") + var ErrInvalidTxValue = errors.New("invalid tx value") + var ErrMissingTxSignature = errors.New("missing tx signature") + var ErrMultipleMinerRewards = errors.New("only one miner reward transaction is allowed per block") + var ErrTooManyTxs = errors.New("too many txs in proposed block") + var ErrTxSignatureNotHandled = errors.New("tx signature scheme not supported yet") + type BalanceValidator struct + func (v *BalanceValidator) MaxTxPerBlock() uint32 + func (v *BalanceValidator) ValidateBlock(block *pb.Block, s state.Reader) error + func (v *BalanceValidator) ValidateTransactions(transactions []*pb.Transaction, s state.Reader) error + func (v *BalanceValidator) ValidateTx(tx *pb.Transaction, s state.Reader) error + type GossipValidator struct + func (g *GossipValidator) ValidateBlock(block *pb.Block, state state.Reader) error + func (g *GossipValidator) ValidateTransactions(transactions []*pb.Transaction, state state.Reader) error + func (g *GossipValidator) ValidateTx(tx *pb.Transaction, state state.Reader) error + type Validator interface + MaxTxPerBlock func() uint32 + ValidateBlock func(block *pb.Block, state state.Reader) error + ValidateTransactions func(transactions []*pb.Transaction, state state.Reader) error + ValidateTx func(tx *pb.Transaction, state state.Reader) error + func NewBalanceValidator(maxTxPerBlock uint32, engine engine.PoW) Validator + func NewGossipValidator(maxTxPerBlock uint32, engine engine.PoW, chReader chain.Reader) Validator