Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTxVersion = errors.New("invalid transaction version") ErrWrongTransactionSize = errors.New("invalid transaction size") ErrBadTimeRange = errors.New("invalid transaction time range") ErrEmptyInputIDs = errors.New("got the empty InputIDs") ErrNotStandardTx = errors.New("not standard transaction") ErrWrongCoinbaseTransaction = errors.New("wrong coinbase transaction") ErrWrongCoinbaseAsset = errors.New("wrong coinbase assetID") ErrCoinbaseArbitraryOversize = errors.New("coinbase arbitrary size is larger than limit") ErrEmptyResults = errors.New("transaction has no results") ErrMismatchedAssetID = errors.New("mismatched assetID") ErrMismatchedPosition = errors.New("mismatched value source/dest position") ErrMismatchedReference = errors.New("mismatched reference") ErrMismatchedValue = errors.New("mismatched value") ErrMissingField = errors.New("missing required field") ErrNoSource = errors.New("no source for value") ErrOverflow = errors.New("arithmetic overflow/underflow") ErrPosition = errors.New("invalid source or destination position") ErrUnbalanced = errors.New("unbalanced asset amount between input and output") ErrOverGasCredit = errors.New("all gas credit has been spend") ErrGasCalculate = errors.New("gas usage calculate got a math error") )
validate transaction error
Functions ¶
func NewTxVMContext ¶
func NewTxVMContext(vs *validationState, entry bc.Entry, prog *bc.Program, args [][]byte) *vm.Context
NewTxVMContext generates the vm.Context for BVM
func ValidateBlock ¶
ValidateBlock validates a block and the transactions within.
Types ¶
type ValidateTxResult ¶ added in v1.1.0
type ValidateTxResult struct {
// contains filtered or unexported fields
}
ValidateTxResult is the result of async tx validate
func ValidateTxs ¶ added in v1.1.0
func ValidateTxs(txs []*bc.Tx, block *bc.Block) []*ValidateTxResult
ValidateTxs validates txs in async mode
func (*ValidateTxResult) GetError ¶ added in v1.1.0
func (r *ValidateTxResult) GetError() error
GetError return the err
func (*ValidateTxResult) GetGasState ¶ added in v1.1.0
func (r *ValidateTxResult) GetGasState() *GasState
GetGasState return the gasStatus
Click to show internal directories.
Click to hide internal directories.