Versions in this module Expand all Collapse all v1 v1.0.2 Aug 16, 2022 v1.0.1 Aug 8, 2022 Changes in this version + var ErrDuplicatedTx = errors.New("duplicate transaction check failed") + var ErrNonceOutofRange = errors.New("nonce is not in range") + var ErrNonceSortedTxsEmpty = errors.New("Empty NonceSortedTxs") + var ErrRejectLowPriority = errors.New("txpool full, rejecting transaction with low priority") + type NonceSortedTxs struct + func NewNonceSortedTxs(acc common.Uint160, cap int) *NonceSortedTxs + func (nst *NonceSortedTxs) CleanIfEmpty() (isEmpty bool) + func (nst *NonceSortedTxs) Drop(hashToDrop common.Uint256) (*transaction.Transaction, bool, error) + func (nst *NonceSortedTxs) Dump() + func (nst *NonceSortedTxs) Empty() bool + func (nst *NonceSortedTxs) ExistTx(hash common.Uint256) bool + func (nst *NonceSortedTxs) Full() bool + func (nst *NonceSortedTxs) GetAllTransactions() []*transaction.Transaction + func (nst *NonceSortedTxs) GetByNonce(nonce uint64) (*transaction.Transaction, error) + func (nst *NonceSortedTxs) GetLatestNonce() (uint64, error) + func (nst *NonceSortedTxs) GetLatestTxn() (*transaction.Transaction, error) + func (nst *NonceSortedTxs) Len() int + func (nst *NonceSortedTxs) PopN(n uint16) ([]*transaction.Transaction, error) + func (nst *NonceSortedTxs) Push(tx *transaction.Transaction) error + func (nst *NonceSortedTxs) Replace(tx *transaction.Transaction) error + func (nst *NonceSortedTxs) Seek() (*transaction.Transaction, error) + type TxPooler interface + AppendTxnPool func(txn *transaction.Transaction) error + CleanSubmittedTransactions func(txns []*transaction.Transaction) error + GetTransaction func(hash common.Uint256) *transaction.Transaction + GetTxnByCount func(num int) (map[common.Uint256]*transaction.Transaction, error) + type TxnPool struct + NanoPayTxs sync.Map + TxLists sync.Map + TxMap sync.Map + TxShortHashMap sync.Map + func NewTxPool() *TxnPool + func (tp *TxnPool) AppendTxnPool(txn *transaction.Transaction) error + func (tp *TxnPool) CleanBlockValidationState(txns []*transaction.Transaction) error + func (tp *TxnPool) CleanSubmittedTransactions(txns []*transaction.Transaction) error + func (tp *TxnPool) DropTxns() + func (tp *TxnPool) GetAddressList() map[common.Uint160]int + func (tp *TxnPool) GetAllTransactionLists() map[common.Uint160][]*transaction.Transaction + func (tp *TxnPool) GetAllTransactions() []*transaction.Transaction + func (tp *TxnPool) GetAllTransactionsBySender(programHash common.Uint160) []*transaction.Transaction + func (tp *TxnPool) GetNonceByTxnPool(addr common.Uint160) (uint64, error) + func (tp *TxnPool) GetSubscribers(topic string) []string + func (tp *TxnPool) GetSubscribersWithMeta(topic string) map[string]string + func (tp *TxnPool) GetTransaction(hash common.Uint256) *transaction.Transaction + func (tp *TxnPool) GetTxnByCount(num int) (map[common.Uint256]*transaction.Transaction, error) + func (tp *TxnPool) GetTxnByHash(hash common.Uint256) *transaction.Transaction + func (tp *TxnPool) GetTxnByShortHash(shortHash []byte) *transaction.Transaction