mempool

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockPool

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

func (*BlockPool) AddToBlockMap

func (pool *BlockPool) AddToBlockMap(block *types.Block)

func (*BlockPool) AddToConfirmMap

func (pool *BlockPool) AddToConfirmMap(confirm *types.DPosProposalVoteSlot)

func (*BlockPool) AppendConfirm

func (pool *BlockPool) AppendConfirm(confirm *types.DPosProposalVoteSlot) (bool, bool, error)

func (*BlockPool) AppendDposBlock

func (pool *BlockPool) AppendDposBlock(dposBlock *types.DposBlock) (bool, bool, error)

func (*BlockPool) ConfirmBlock

func (pool *BlockPool) ConfirmBlock(hash common.Uint256) (bool, bool, error)

func (*BlockPool) GetBlock

func (pool *BlockPool) GetBlock(hash common.Uint256) (*types.Block, bool)

func (*BlockPool) GetConfirm

func (pool *BlockPool) GetConfirm(hash common.Uint256) (*types.DPosProposalVoteSlot, bool)

func (*BlockPool) Init

func (pool *BlockPool) Init()

type TxPool

type TxPool struct {
	sync.RWMutex

	Listeners map[protocol.TxnPoolListener]interface{}
	// contains filtered or unexported fields
}

func (*TxPool) AppendToTxnPool

func (pool *TxPool) AppendToTxnPool(txn *Transaction) ErrCode

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

func (*TxPool) CleanSubmittedTransactions

func (pool *TxPool) CleanSubmittedTransactions(block *Block) error

clean the trasaction Pool with committed block.

func (*TxPool) GetTransaction

func (pool *TxPool) GetTransaction(hash Uint256) *Transaction

get the transaction by hash

func (*TxPool) GetTransactionCount

func (pool *TxPool) GetTransactionCount() int

func (*TxPool) GetTransactionPool

func (pool *TxPool) GetTransactionPool(hasMaxCount bool) map[Uint256]*Transaction

get the transaction in txnpool

func (*TxPool) Init

func (pool *TxPool) Init()

func (*TxPool) IsDuplicateSidechainTx

func (pool *TxPool) IsDuplicateSidechainTx(sidechainTxHash Uint256) bool

func (*TxPool) MaybeAcceptTransaction

func (pool *TxPool) MaybeAcceptTransaction(txn *Transaction) error

func (*TxPool) RemoveTransaction

func (pool *TxPool) RemoveTransaction(txn *Transaction)

Jump to

Keyboard shortcuts

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