Documentation ¶
Index ¶
- Constants
- Variables
- func EncryptPrivateKeysPackage(publicFlipKey *ecies.PrivateKey, privateFlipKey *ecies.PrivateKey, ...) []byte
- func NewTxKeeper(datadir string) *txKeeper
- type AsyncKeysPool
- func (pool *AsyncKeysPool) AddPrivateKeysPackage(keysPackage *types.PrivateFlipKeysPackage, _ bool) error
- func (pool *AsyncKeysPool) AddPublicFlipKey(key *types.PublicFlipKey, _ bool) error
- func (pool *AsyncKeysPool) GetFlipKeysForSync(shardId common.ShardId, noFilter bool) []*types.PublicFlipKey
- func (pool *AsyncKeysPool) GetFlipPackagesHashesForSync(shardId common.ShardId, noFilter bool) []common.Hash128
- type AsyncTxPool
- type FlipKeysPool
- type KeysPool
- func (p *KeysPool) Add(hash common.Hash128, entry interface{}, id common.ShardId, highPriority bool)
- func (p *KeysPool) AddPrivateFlipKeysPackages(batch []*types.PrivateFlipKeysPackage)
- func (p *KeysPool) AddPrivateKeysPackage(keysPackage *types.PrivateFlipKeysPackage, own bool) error
- func (p *KeysPool) AddPublicFlipKey(key *types.PublicFlipKey, own bool) error
- func (p *KeysPool) AddPublicFlipKeys(batch []*types.PublicFlipKey)
- func (p *KeysPool) Clear()
- func (p *KeysPool) Get(hash common.Hash128) (entry interface{}, id common.ShardId, highPriority bool, present bool)
- func (p *KeysPool) GetEncryptedPrivateFlipKey(indexInPackage int, address common.Address) []byte
- func (p *KeysPool) GetFlipKeysForSync(shardId common.ShardId, noFilter bool) []*types.PublicFlipKey
- func (p *KeysPool) GetFlipPackagesHashesForSync(shardId common.ShardId, noFilter bool) []common.Hash128
- func (p *KeysPool) GetPublicFlipKey(address common.Address) *ecies.PrivateKey
- func (p *KeysPool) Has(hash common.Hash128) bool
- func (p *KeysPool) Initialize(head *types.Header)
- func (p *KeysPool) MaxParallelPulls() uint32
- func (p *KeysPool) PushTracker() pushpull.PendingPushTracker
- func (p *KeysPool) StopSyncing()
- func (p *KeysPool) SupportPendingRequests() bool
- type TransactionPool
- type TxPool
- func (pool *TxPool) AddExternalTxs(txs ...*types.Transaction) error
- func (pool *TxPool) AddInternalTx(tx *types.Transaction) error
- func (pool *TxPool) BuildBlockTransactions() []*types.Transaction
- func (pool *TxPool) GetPendingByAddress(address common.Address) []*types.Transaction
- func (pool *TxPool) GetPendingTransaction(noFilter bool, shardId common.ShardId, count bool) []*types.Transaction
- func (pool *TxPool) GetTx(hash common.Hash) *types.Transaction
- func (pool *TxPool) Initialize(head *types.Header, coinbase common.Address, useTxKeeper bool)
- func (pool *TxPool) IsSyncing() bool
- func (pool *TxPool) Remove(transaction *types.Transaction)
- func (pool *TxPool) ResetTo(block *types.Block)
- func (pool *TxPool) StartSync()
- func (pool *TxPool) StopSync(block *types.Block)
- func (pool *TxPool) Validate(tx *types.Transaction) error
Constants ¶
View Source
const (
Folder = "mempool-txs"
)
View Source
const (
MaxDeferredTxs = 100
)
Variables ¶
View Source
var ( KeyIsAlreadyPublished = errors.New("sender has already published his keys") KeySkipped = errors.New("key has been skipped") )
View Source
var ( DuplicateTxError = errors.New("tx with same hash already exists") MempoolFullError = errors.New("mempool is full") )
Functions ¶
func EncryptPrivateKeysPackage ¶
func EncryptPrivateKeysPackage(publicFlipKey *ecies.PrivateKey, privateFlipKey *ecies.PrivateKey, pubKeys [][]byte) []byte
func NewTxKeeper ¶ added in v0.25.3
func NewTxKeeper(datadir string) *txKeeper
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(shardId common.ShardId, noFilter bool) []*types.PublicFlipKey
func (*AsyncKeysPool) GetFlipPackagesHashesForSync ¶ added in v0.22.0
type AsyncTxPool ¶
type AsyncTxPool struct {
// contains filtered or unexported fields
}
func NewAsyncTxPool ¶
func NewAsyncTxPool(txPool *TxPool) *AsyncTxPool
func (*AsyncTxPool) AddExternalTxs ¶ added in v0.25.3
func (pool *AsyncTxPool) AddExternalTxs(txs ...*types.Transaction) error
func (*AsyncTxPool) AddInternalTx ¶ added in v0.25.3
func (pool *AsyncTxPool) AddInternalTx(tx *types.Transaction) error
func (*AsyncTxPool) GetPendingTransaction ¶
func (pool *AsyncTxPool) GetPendingTransaction(noFilter bool, id common.ShardId, count bool) []*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(shardId common.ShardId, noFilter bool) []common.Hash128 GetFlipKeysForSync(shardId common.ShardId, noFilter bool) []*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 (*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) GetEncryptedPrivateFlipKey ¶ added in v0.23.1
func (*KeysPool) GetFlipKeysForSync ¶ added in v0.22.0
func (*KeysPool) GetFlipPackagesHashesForSync ¶ added in v0.22.0
func (*KeysPool) GetPublicFlipKey ¶
func (p *KeysPool) GetPublicFlipKey(address common.Address) *ecies.PrivateKey
func (*KeysPool) Initialize ¶
func (*KeysPool) MaxParallelPulls ¶ added in v0.19.5
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
type TransactionPool ¶
type TransactionPool interface { AddInternalTx(tx *types.Transaction) error AddExternalTxs(txs ...*types.Transaction) error GetPendingTransaction(noFilter bool, id common.ShardId, count bool) []*types.Transaction IsSyncing() bool }
type TxPool ¶
type TxPool struct {
// contains filtered or unexported fields
}
func (*TxPool) AddExternalTxs ¶ added in v0.25.3
func (pool *TxPool) AddExternalTxs(txs ...*types.Transaction) error
func (*TxPool) AddInternalTx ¶ added in v0.25.3
func (pool *TxPool) AddInternalTx(tx *types.Transaction) error
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 (*TxPool) Initialize ¶
func (*TxPool) Remove ¶
func (pool *TxPool) Remove(transaction *types.Transaction)
Click to show internal directories.
Click to hide internal directories.