Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrorAccountNotOnMempool = errors.New("the account is not being tracked by the memppol")
)
Functions ¶
This section is empty.
Types ¶
type ActionMempool ¶
type ActionMempool interface {
// Notifiers
NotifyIllegalVotes(slashing *primitives.VoteSlashing)
NewTip(_ *chainindex.BlockRow, _ *primitives.Block, _ state.State, _ []*primitives.EpochReceipt)
ProposerSlashingConditionViolated(slashing *primitives.ProposerSlashing)
// Remove on block
RemoveByBlock(b *primitives.Block, tipState state.State)
// Adders
AddDeposit(deposit *primitives.Deposit) error
AddGovernanceVote(vote *primitives.GovernanceVote, state state.State) error
AddExit(exit *primitives.Exit) error
AddProof(p *burnproof.CoinsProofSerializable) error
AddPartialExit(p *primitives.PartialExit) error
// Getters
GetDeposits(num int, withState state.State) ([]*primitives.Deposit, state.State, error)
GetProposerSlashings(num int, state state.State) ([]*primitives.ProposerSlashing, error)
GetExits(num int, state state.State) ([]*primitives.Exit, error)
GetVoteSlashings(num int, state state.State) ([]*primitives.VoteSlashing, error)
GetRANDAOSlashings(num int, state state.State) ([]*primitives.RANDAOSlashing, error)
GetGovernanceVotes(num int, state state.State) ([]*primitives.GovernanceVote, error)
GetProofs(num int, state state.State) ([]*burnproof.CoinsProofSerializable, error)
GetPartialExits(num int, state state.State) ([]*primitives.PartialExit, error)
}
ActioMempool is the interface dor actionMempool
func NewActionMempool ¶
func NewActionMempool(blockchain chain.Blockchain, hostnode hostnode.HostNode) (ActionMempool, error)
NewActionMempool constructs a new action mempool.
type CoinsMempool ¶
type CoinsMempool interface {
Add(item *primitives.Tx) error
RemoveByBlock(b *primitives.Block)
Get(maxTransactions uint64, s state.State, feeRedeemAccount [20]byte) ([]*primitives.Tx, state.State)
GetWithoutApply() []*primitives.Tx
AddMulti(item *primitives.TxMulti) error
GetMulti(maxTransactions uint64, s state.State) []*primitives.TxMulti
Notify(n CoinsNotifee)
Unnotify(n CoinsNotifee)
}
CoinsMempool is an interface for coinMempool
func NewCoinsMempool ¶
func NewCoinsMempool(ch chain.Blockchain, hostNode hostnode.HostNode) (CoinsMempool, error)
NewCoinsMempool constructs a new coins mempool.
type CoinsNotifee ¶
type CoinsNotifee interface {
NotifyTx(tx *primitives.Tx)
}
type VoteMempool ¶
type VoteMempool interface {
AddValidate(vote *primitives.MultiValidatorVote, s state.State) error
Add(vote *primitives.MultiValidatorVote)
Get(slot uint64, s state.State, proposerIndex uint64) ([]*primitives.MultiValidatorVote, error)
Remove(b *primitives.Block)
Notify(notifee VoteSlashingNotifee)
}
VoteMempool is the interface of the voteMempool
func NewVoteMempool ¶
func NewVoteMempool(ch chain.Blockchain, hostnode hostnode.HostNode, manager actionmanager.LastActionManager) (VoteMempool, error)
NewVoteMempool creates a new mempool.
type VoteSlashingNotifee ¶
type VoteSlashingNotifee interface {
NotifyIllegalVotes(slashing *primitives.VoteSlashing)
}
VoteSlashingNotifee is notified when an illegal vote occurs.
Click to show internal directories.
Click to hide internal directories.