transactionhelper

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: ISC Imports: 2 Imported by: 13

Documentation

Index

Constants

View Source
const CoinbaseTransactionIndex = 0

CoinbaseTransactionIndex is the index of the coinbase transaction in every block

Variables

This section is empty.

Functions

func IsCoinBase

func IsCoinBase(tx *externalapi.DomainTransaction) bool

IsCoinBase determines whether or not a transaction is a coinbase transaction. A coinbase transaction is a special transaction created by miners that distributes fees and block subsidy to the previous blocks' miners, and to specify the scriptPubKey that will be used to pay the current miner in future blocks. Each input of the coinbase transaction should set index to maximum value and reference the relevant block id, instead of previous transaction id.

func NewNativeTransaction

NewNativeTransaction returns a new native transaction

func NewSubnetworkTransaction

func NewSubnetworkTransaction(version uint16, inputs []*externalapi.DomainTransactionInput,
	outputs []*externalapi.DomainTransactionOutput, subnetworkID *externalapi.DomainSubnetworkID,
	gas uint64, payload []byte) *externalapi.DomainTransaction

NewSubnetworkTransaction returns a new trsnactions in the specified subnetwork with specified gas and payload

Types

This section is empty.

Jump to

Keyboard shortcuts

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