mempool

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: LGPL-3.0 Imports: 28 Imported by: 6

Documentation

Index

Constants

View Source
const (
	MaxDeferredTxs = 100
)

Variables

View Source
var (
	DuplicateTxError = errors.New("tx with same hash already exists")
	MempoolFullError = errors.New("mempool is full")
)
View Source
var (
	KeyIsAlreadyPublished = errors.New("sender has already published his keys")
)

Functions

func EncryptPrivateKeysPackage

func EncryptPrivateKeysPackage(publicFlipKey *ecies.PrivateKey, privateFlipKey *ecies.PrivateKey, pubKeys [][]byte) []byte

Types

type AsyncKeysPool added in v0.19.3

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

func (*AsyncKeysPool) AddPrivateKeysPackage added in v0.19.3

func (pool *AsyncKeysPool) AddPrivateKeysPackage(keysPackage *types.PrivateFlipKeysPackage, _ bool) error

func (*AsyncKeysPool) AddPublicFlipKey added in v0.19.3

func (pool *AsyncKeysPool) AddPublicFlipKey(key *types.PublicFlipKey, _ bool) error

func (*AsyncKeysPool) GetFlipKeysForSync added in v0.22.0

func (pool *AsyncKeysPool) GetFlipKeysForSync() []*types.PublicFlipKey

func (*AsyncKeysPool) GetFlipPackagesHashesForSync added in v0.22.0

func (pool *AsyncKeysPool) GetFlipPackagesHashesForSync() []common.Hash128

type AsyncTxPool

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

func NewAsyncTxPool

func NewAsyncTxPool(txPool *TxPool) *AsyncTxPool

func (*AsyncTxPool) Add

func (pool *AsyncTxPool) Add(tx *types.Transaction) error

func (*AsyncTxPool) GetPendingTransaction

func (pool *AsyncTxPool) GetPendingTransaction() []*types.Transaction

func (*AsyncTxPool) IsSyncing added in v0.22.0

func (pool *AsyncTxPool) IsSyncing() bool

type FlipKeysPool added in v0.19.3

type FlipKeysPool interface {
	AddPrivateKeysPackage(keysPackage *types.PrivateFlipKeysPackage, own bool) error
	AddPublicFlipKey(key *types.PublicFlipKey, own bool) error
	GetFlipPackagesHashesForSync() []common.Hash128
	GetFlipKeysForSync() []*types.PublicFlipKey
}

func NewAsyncKeysPool added in v0.19.3

func NewAsyncKeysPool(inner *KeysPool) FlipKeysPool

type KeysPool

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

func NewKeysPool

func NewKeysPool(db dbm.DB, appState *appstate.AppState, bus eventbus.Bus, secStore *secstore.SecStore) *KeysPool

func (*KeysPool) Add

func (p *KeysPool) Add(hash common.Hash128, entry interface{}, highPriority bool)

func (*KeysPool) AddPrivateFlipKeysPackages added in v0.19.3

func (p *KeysPool) AddPrivateFlipKeysPackages(batch []*types.PrivateFlipKeysPackage)

func (*KeysPool) AddPrivateKeysPackage

func (p *KeysPool) AddPrivateKeysPackage(keysPackage *types.PrivateFlipKeysPackage, own bool) error

func (*KeysPool) AddPublicFlipKey

func (p *KeysPool) AddPublicFlipKey(key *types.PublicFlipKey, own bool) error

func (*KeysPool) AddPublicFlipKeys added in v0.19.3

func (p *KeysPool) AddPublicFlipKeys(batch []*types.PublicFlipKey)

func (*KeysPool) Clear

func (p *KeysPool) Clear()

func (*KeysPool) Get

func (p *KeysPool) Get(hash common.Hash128) (entry interface{}, highPriority bool, present bool)

func (*KeysPool) GetEncryptedPrivateFlipKey added in v0.23.1

func (p *KeysPool) GetEncryptedPrivateFlipKey(indexInPackage int, address common.Address) []byte

func (*KeysPool) GetFlipKeysForSync added in v0.22.0

func (p *KeysPool) GetFlipKeysForSync() []*types.PublicFlipKey

func (*KeysPool) GetFlipPackagesHashesForSync added in v0.22.0

func (p *KeysPool) GetFlipPackagesHashesForSync() []common.Hash128

func (*KeysPool) GetPublicFlipKey

func (p *KeysPool) GetPublicFlipKey(address common.Address) *ecies.PrivateKey

func (*KeysPool) Has

func (p *KeysPool) Has(hash common.Hash128) bool

func (*KeysPool) Initialize

func (p *KeysPool) Initialize(head *types.Header)

func (*KeysPool) MaxParallelPulls added in v0.19.5

func (p *KeysPool) MaxParallelPulls() uint32

func (*KeysPool) PushTracker added in v0.19.5

func (p *KeysPool) PushTracker() pushpull.PendingPushTracker

func (*KeysPool) StopSyncing added in v0.22.0

func (p *KeysPool) StopSyncing()

func (*KeysPool) SupportPendingRequests added in v0.19.5

func (p *KeysPool) SupportPendingRequests() bool

type TransactionPool

type TransactionPool interface {
	Add(tx *types.Transaction) error
	GetPendingTransaction() []*types.Transaction
	IsSyncing() bool
}

type TxPool

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

func NewTxPool

func NewTxPool(appState *appstate.AppState, bus eventbus.Bus, cfg *config.Mempool, statsCollector collector.StatsCollector) *TxPool

func (*TxPool) Add

func (pool *TxPool) Add(tx *types.Transaction) error

func (*TxPool) AddTxs added in v0.19.3

func (pool *TxPool) AddTxs(txs []*types.Transaction)

func (*TxPool) BuildBlockTransactions

func (pool *TxPool) BuildBlockTransactions() []*types.Transaction

func (*TxPool) GetPendingByAddress

func (pool *TxPool) GetPendingByAddress(address common.Address) []*types.Transaction

func (*TxPool) GetPendingTransaction

func (pool *TxPool) GetPendingTransaction() []*types.Transaction

func (*TxPool) GetTx

func (pool *TxPool) GetTx(hash common.Hash) *types.Transaction

func (*TxPool) Initialize

func (pool *TxPool) Initialize(head *types.Header, coinbase common.Address)

func (*TxPool) IsSyncing added in v0.22.0

func (pool *TxPool) IsSyncing() bool

func (*TxPool) Remove

func (pool *TxPool) Remove(transaction *types.Transaction)

func (*TxPool) ResetTo

func (pool *TxPool) ResetTo(block *types.Block)

func (*TxPool) StartSync

func (pool *TxPool) StartSync()

func (*TxPool) StopSync

func (pool *TxPool) StopSync(block *types.Block)

func (*TxPool) Validate

func (pool *TxPool) Validate(tx *types.Transaction) error

validate tx as inbound transaction

Jump to

Keyboard shortcuts

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