transaction

package
v0.0.0-...-2f442fc Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2018 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Broadcast

func Broadcast(tx *wire.MsgTx, peers []*peer.Peer) error

func ClearCaches

func ClearCaches(pkHashes [][]byte) error

func ConditionallySaveTransaction

func ConditionallySaveTransaction(msg *wire.MsgTx, dbBlock *db.Block, userNode bool) (bool, bool, error)

func ConvertChainHashToBCH

func ConvertChainHashToBCH(hash *chainhash.Hash) *chainhash2.Hash

func ConvertChainHashToBTC

func ConvertChainHashToBTC(hash *chainhash2.Hash) *chainhash.Hash

func Create

func Create(spendOuts []*db.TransactionOut, privateKey *wallet.PrivateKey, spendOutputs []memo.Output) (*wire.MsgTx, error)

func DisableBatchPostProcessing

func DisableBatchPostProcessing()

func EnableBatchPostProcessing

func EnableBatchPostProcessing()

func GetMemoOutputIfExists

func GetMemoOutputIfExists(txn *db.Transaction) (*db.TransactionOut, error)

func GetPkHashesFromTxn

func GetPkHashesFromTxn(dbTxn *db.Transaction) [][]byte

func ProcessNotifications

func ProcessNotifications() (uint, []error)

func QueueTx

func QueueTx(tx *memo.Tx)

func SaveMemo

func SaveMemo(txn *db.Transaction, out *db.TransactionOut, block *db.Block) error

func SaveTransaction

func SaveTransaction(txn *db.Transaction, block *db.Block) error

func UpdateRootTxHashes

func UpdateRootTxHashes() (uint, []error)

func WaitForPic

func WaitForPic(txHash *chainhash.Hash) error

func WaitForTx

func WaitForTx(txHash *chainhash.Hash) error

Types

type MerkleTransaction

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

func GetTransactionsFromMerkleBlock

func GetTransactionsFromMerkleBlock(merkleBlock *wire.MsgMerkleBlock) []MerkleTransaction

func (*MerkleTransaction) GetTxId

func (m *MerkleTransaction) GetTxId() chainhash.Hash

type TxInfo

type TxInfo struct {
	Error           error
	Raw             []byte
	Hash            string
	TotalInputValue int64
	OutputValue     int64
	Change          int64
	Fee             int64
	Size            int
	Inputs          []*TxInfoInput
	Outputs         []*TxInfoOutput
}

func GetTxInfo

func GetTxInfo(tx *memo.Tx) TxInfo

func (TxInfo) Print

func (t TxInfo) Print()

func (TxInfo) PrintJson

func (t TxInfo) PrintJson()

func (TxInfo) PrintVerbose

func (t TxInfo) PrintVerbose()

type TxInfoAddress

type TxInfoAddress struct {
	Address      string
	ScriptClass  string
	RequiredSigs int
}

type TxInfoInput

type TxInfoInput struct {
	Value        int64
	Signature    []byte
	Sequence     uint32
	PrevOutHash  string
	UnlockScript string
}

type TxInfoOutput

type TxInfoOutput struct {
	Value      int64
	LockScript string
	Address    TxInfoAddress
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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