Documentation ¶
Index ¶
- func ErrToRejectErr(err error) (msg.RejectCode, string)
- type BlockPool
- func (bm *BlockPool) AddDposBlock(dposBlock *types.DposBlock) (bool, bool, error)
- func (bm *BlockPool) AddToBlockMap(block *types.Block)
- func (bm *BlockPool) AddToConfirmMap(confirm *payload.Confirm)
- func (bm *BlockPool) AppendConfirm(confirm *payload.Confirm) (bool, bool, error)
- func (bm *BlockPool) AppendDposBlock(dposBlock *types.DposBlock) (bool, bool, error)
- func (bm *BlockPool) CheckConfirmedBlockOnFork(height uint32, block *types.Block) error
- func (bm *BlockPool) CleanFinalConfirmedBlock(height uint32)
- func (bm *BlockPool) ConfirmBlock(hash common.Uint256) (bool, bool, error)
- func (bm *BlockPool) GetBlock(hash common.Uint256) (*types.Block, bool)
- func (bm *BlockPool) GetConfirm(hash common.Uint256) (*payload.Confirm, bool)
- func (bm *BlockPool) GetDposBlockByHash(hash common.Uint256) (*types.DposBlock, error)
- type ConfirmInfo
- type TxPool
- func (mp *TxPool) AppendToTxPool(tx *Transaction) error
- func (mp *TxPool) CleanSubmittedTransactions(block *Block)
- func (mp *TxPool) GetTransaction(hash Uint256) *Transaction
- func (mp *TxPool) GetTransactionCount() int
- func (mp *TxPool) GetTxsInPool() []*Transaction
- func (mp *TxPool) HaveTransaction(txId Uint256) bool
- func (mp *TxPool) IsDuplicateSidechainTx(sidechainTxHash Uint256) bool
- func (mp *TxPool) MaybeAcceptTransaction(tx *Transaction) error
- func (mp *TxPool) RemoveTransaction(txn *Transaction)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrToRejectErr ¶ added in v0.3.1
func ErrToRejectErr(err error) (msg.RejectCode, string)
ErrToRejectErr examines the underlying type of the error and returns a reject code and string appropriate to be sent in a wire.MsgReject message.
Types ¶
type BlockPool ¶
type BlockPool struct { Chain *blockchain.BlockChain Store blockchain.IChainStore IsCurrent func() bool sync.RWMutex // contains filtered or unexported fields }
func NewBlockPool ¶ added in v0.3.0
func (*BlockPool) AddDposBlock ¶ added in v0.3.0
func (*BlockPool) AddToBlockMap ¶
func (*BlockPool) AddToConfirmMap ¶
func (*BlockPool) AppendConfirm ¶
func (*BlockPool) AppendDposBlock ¶
func (*BlockPool) CheckConfirmedBlockOnFork ¶ added in v0.3.0
func (*BlockPool) CleanFinalConfirmedBlock ¶ added in v0.3.0
func (*BlockPool) ConfirmBlock ¶
func (*BlockPool) GetConfirm ¶
type ConfirmInfo ¶ added in v0.3.4
type TxPool ¶
func (*TxPool) AppendToTxPool ¶ added in v0.3.0
append transaction to txnpool when check ok. 1.check 2.check with ledger(db) 3.check with pool
func (*TxPool) CleanSubmittedTransactions ¶
func (mp *TxPool) CleanSubmittedTransactions(block *Block)
clean the trasaction Pool with committed block.
func (*TxPool) GetTransaction ¶
func (mp *TxPool) GetTransaction(hash Uint256) *Transaction
get the transaction by hash
func (*TxPool) GetTransactionCount ¶
func (*TxPool) GetTxsInPool ¶ added in v0.3.0
func (mp *TxPool) GetTxsInPool() []*Transaction
GetTxsInPool returns a slice of all transactions in the mp.
This function is safe for concurrent access.
func (*TxPool) HaveTransaction ¶ added in v0.3.0
HaveTransaction returns if a transaction is in transaction pool by the given transaction id. If no transaction match the transaction id, return false
func (*TxPool) IsDuplicateSidechainTx ¶
func (*TxPool) MaybeAcceptTransaction ¶
func (*TxPool) RemoveTransaction ¶
func (mp *TxPool) RemoveTransaction(txn *Transaction)
Click to show internal directories.
Click to hide internal directories.