pending_txs

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountPendingTxs

type AccountPendingTxs struct {
	PendingTxs map[uint64]map[types.TransactionId]nanoTx // nonce -> TxID -> nanoTx
	// contains filtered or unexported fields
}

func NewAccountPendingTxs

func NewAccountPendingTxs() *AccountPendingTxs

func (*AccountPendingTxs) Add

func (apt *AccountPendingTxs) Add(layer types.LayerID, txs ...*types.Transaction)

func (*AccountPendingTxs) GetProjection

func (apt *AccountPendingTxs) GetProjection(prevNonce, prevBalance uint64) (nonce, balance uint64)

func (*AccountPendingTxs) IsEmpty

func (apt *AccountPendingTxs) IsEmpty() bool

func (*AccountPendingTxs) Remove

func (apt *AccountPendingTxs) Remove(accepted, rejected []*types.Transaction, layer types.LayerID)

func (*AccountPendingTxs) RemoveNonce

func (apt *AccountPendingTxs) RemoveNonce(nonce uint64, deleteTx func(id types.TransactionId))

func (*AccountPendingTxs) ValidTxs

func (apt *AccountPendingTxs) ValidTxs(prevNonce, prevBalance uint64) (txIds []types.TransactionId, nonce, balance uint64)

type MeshAndPoolProjector

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

func NewMeshAndPoolProjector

func NewMeshAndPoolProjector(mesh meshProjector, pool poolProjector) *MeshAndPoolProjector

func (*MeshAndPoolProjector) GetProjection

func (p *MeshAndPoolProjector) GetProjection(addr types.Address, prevNonce, prevBalance uint64) (nonce, balance uint64, err error)

type StateAndMeshProjector

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

func NewStateAndMeshProjector

func NewStateAndMeshProjector(state globalState, mesh meshProjector) *StateAndMeshProjector

func (*StateAndMeshProjector) GetProjection

func (p *StateAndMeshProjector) GetProjection(addr types.Address) (nonce, balance uint64, err error)

Jump to

Keyboard shortcuts

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