types

package
v0.0.0-...-9098a98 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package types defines custom types to represent the response from the node server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TxStatus

type TxStatus struct {
	StatusCode   TxStatusCode
	ErrorMessage string
	Tx           *ultpb.Tx
}

TxStatus represents the status of current tx in node.

type TxStatusCode

type TxStatusCode uint8

TxStatusCode represents the status of a tx in node. Each tx will first go through some preliminary checks which we call them admission checks. Only after the tx passes the admission checks that it will be sent to internal tx manager for later processing.

const (
	// The tx does not exist.
	NotExist TxStatusCode = iota
	// The tx failed to pass the admission checks.
	Rejected
	// The tx has passed the admission checks and has been
	// added to the internal tx manager.
	Accepted
	// The tx has been applied successfully.
	Confirmed
	// The tx is failed to be applied for some errors.
	Failed
	// The tx is failed because of some internal errors.
	Unknown
)

func (TxStatusCode) String

func (ts TxStatusCode) String() string

Jump to

Keyboard shortcuts

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