transactions

package
v0.0.0-...-34de315 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExist    = errors.New("transaction already exists")
	ErrNotExist = errors.New("transaction does not exist")
)

Errors exported by the package.

Functions

This section is empty.

Types

type Repo

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

Repo represents the repository for transactions.

func NewRepo

func NewRepo() *Repo

NewRepo creates a new repository for transactions.

func (*Repo) Add

func (repo *Repo) Add(tx *types.Transaction) error

Add adds a transaction to the transaction pool.

func (*Repo) Get

func (repo *Repo) Get(hash types.Hash) (*types.Transaction, error)

Get retrieves a transaction from the transaction pool.

func (*Repo) Has

func (repo *Repo) Has(hash types.Hash) bool

Has checks whether a transaction exists in the transaction pool.

Jump to

Keyboard shortcuts

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