pool

package
v0.3.9-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExclusivedSigchainHeight = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

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, winningHash common.Uint256) (map[common.Uint256]*Transaction, error)

Jump to

Keyboard shortcuts

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