pool

package
v0.0.0-...-7bd4979 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: MIT Imports: 13 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PriorityQueue

type PriorityQueue []*TransactionInfo

func (*PriorityQueue) Contains

func (PriorityQueue) Full

func (pq PriorityQueue) Full() bool

func (PriorityQueue) Len

func (pq PriorityQueue) Len() int

func (PriorityQueue) Less

func (pq PriorityQueue) Less(i, j int) bool

func (*PriorityQueue) Pop

func (pq *PriorityQueue) Pop() *TransactionInfo

func (*PriorityQueue) Push

func (pq *PriorityQueue) Push(newTi *TransactionInfo) error

func (*PriorityQueue) Remove

func (*PriorityQueue) RemoveTxInBlock

func (pq *PriorityQueue) RemoveTxInBlock(block *block.Block, maxOTSTracking uint64)

func (PriorityQueue) Swap

func (pq PriorityQueue) Swap(i, j int)

type TransactionInfo

type TransactionInfo struct {
	// contains filtered or unexported fields
}

func CreateTransactionInfo

func CreateTransactionInfo(tx transactions.TransactionInterface, blockNumber uint64, timestamp uint64) *TransactionInfo

func (*TransactionInfo) BlockNumber

func (t *TransactionInfo) BlockNumber() uint64

func (*TransactionInfo) IsStale

func (t *TransactionInfo) IsStale(currentBlockHeight uint64) bool

func (*TransactionInfo) Timestamp

func (t *TransactionInfo) Timestamp() uint64

func (*TransactionInfo) Transaction

func (*TransactionInfo) UpdateBlockNumber

func (t *TransactionInfo) UpdateBlockNumber(currentBlockHeight uint64)

type TransactionPool

type TransactionPool struct {
	// contains filtered or unexported fields
}

func CreateTransactionPool

func CreateTransactionPool() *TransactionPool

func (*TransactionPool) Add

func (t *TransactionPool) Add(tx transactions.TransactionInterface, blockNumber uint64, timestamp uint64) error

func (*TransactionPool) AddTxFromBlock

func (t *TransactionPool) AddTxFromBlock(block *block.Block, currentBlockHeight uint64) error

func (*TransactionPool) CheckStale

func (t *TransactionPool) CheckStale(currentBlockHeight uint64, state *state.State) error

func (*TransactionPool) Contains

func (*TransactionPool) IsFull

func (t *TransactionPool) IsFull() bool

func (*TransactionPool) Pop

func (t *TransactionPool) Pop() *TransactionInfo

func (*TransactionPool) Remove

func (*TransactionPool) RemoveTxInBlock

func (t *TransactionPool) RemoveTxInBlock(block *block.Block)

func (*TransactionPool) SetChanTransactionAction

func (t *TransactionPool) SetChanTransactionAction(ta chan *transactionaction.TransactionAction)

func (*TransactionPool) SetRegisterAndBroadcastChan

func (t *TransactionPool) SetRegisterAndBroadcastChan(c chan *messages.RegisterMessage)

Jump to

Keyboard shortcuts

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