pool

package
v0.7.2-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExclusivedSigchainHeight = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TransactionMap

type TransactionMap map[common.Uint256]*Transaction

func (TransactionMap) Iterate

func (iterable TransactionMap) Iterate(handler func(item *Transaction) ErrCode) ErrCode

type TxnPool

type TxnPool struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewTxnPool

func NewTxnPool() *TxnPool

func (*TxnPool) AppendTxnPool

func (tp *TxnPool) AppendTxnPool(txn *Transaction) ErrCode

append transaction to txnpool when check ok. 1.check transaction. 2.check with ledger(db) 3.check with pool

func (*TxnPool) CleanSubmittedTransactions

func (tp *TxnPool) CleanSubmittedTransactions(txns []*Transaction) error

clean the trasaction Pool with committed block.

func (*TxnPool) GetAllTransactions

func (tp *TxnPool) GetAllTransactions() map[common.Uint256]*Transaction

func (*TxnPool) GetTransaction

func (tp *TxnPool) GetTransaction(hash common.Uint256) *Transaction

get the transaction by hash

func (*TxnPool) GetTransactionCount

func (tp *TxnPool) GetTransactionCount() int

func (*TxnPool) GetTxnByCount

func (tp *TxnPool) GetTxnByCount(num int) (map[common.Uint256]*Transaction, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL