Versions in this module Expand all Collapse all v0 v0.1.0 Jul 23, 2018 Changes in this version + var ErrInconsistentTransactions = errors.New("transactions are inconsistent") + var ErrInsufficientBalance = errors.New("tx sender does not have enough coins to send") + var ErrInvalidBlock = errors.New("invalid block") + var ErrInvalidTxKey = errors.New("txkey byte representation is invalid") + var ErrInvalidTxNonce = errors.New("invalid tx nonce") + var OptPrefix = func(prefix []byte) Opt + func ValidateBalance(s Reader, tx *pb.Transaction) error + func ValidateBalances(s Reader, transactions []*pb.Transaction) error + type GreedyInMemoryTxPool struct + func (m *GreedyInMemoryTxPool) AddTransaction(tx *pb.Transaction) error + func (m *GreedyInMemoryTxPool) Peek(n uint32) []*pb.Transaction + func (m *GreedyInMemoryTxPool) Pending() uint64 + func (m *GreedyInMemoryTxPool) PopTransaction() *pb.Transaction + type Opt func(*stateDB) + type Reader interface + GetAccount func(pubKey []byte) (*pb.Account, error) + MerkleRoot func() (multihash.Multihash, error) + type State interface + func NewState(database db.ReadWriteBatcher, opts ...Opt) State + type TxKey struct + BlkHash []byte + TxIdx uint64 + func (t *TxKey) Marshal() []byte + func (t *TxKey) Unmarshal(data []byte) error + type TxPool interface + AddTransaction func(tx *pb.Transaction) error + Peek func(n uint32) []*pb.Transaction + Pending func() uint64 + PopTransaction func() *pb.Transaction + type TxReader interface + GetAccountTxKeys func(pubKey []byte) ([]*TxKey, error) + type Writer interface + ProcessBlock func(blk *pb.Block) error + RollbackBlock func(blk *pb.Block) error + UpdateAccount func(pubKey []byte, account *pb.Account) error