ltx

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2018 License: BSD-2-Clause Imports: 20 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ScriptVerifyChan chan struct {
	// contains filtered or unexported fields
}

Functions

func ApplyBlockTransactions

func ApplyBlockTransactions(txs []*tx.Tx, bip30Enable bool, scriptCheckFlags uint32, needCheckScript bool,
	blockSubSidy amount.Amount, blockHeight int32, blockMaxSigOpsCount uint64) (coinMap *utxo.CoinsMap, bundo *undo.BlockUndo, err error)

func CalculateLockPoints

func CalculateLockPoints(transaction *tx.Tx, flags uint32) (lp *mempool.LockPoints)

CalculateLockPoints calculate lockpoint(all ins' max time or height at which it can be spent) of transaction

func CalculateSequenceLocks

func CalculateSequenceLocks(transaction *tx.Tx, coinsMap *utxo.CoinsMap, flags uint32) (height int32, time int64)

func CheckBlockTransactions

func CheckBlockTransactions(txs []*tx.Tx, maxBlockSigOps uint64) error

CheckBlockTransactions block service use these 3 func to check transactions or to apply transaction while connecting block to active chain

func CheckInputsMoney

func CheckInputsMoney(transaction *tx.Tx, coinsMap *utxo.CoinsMap, spendHeight int32) (err error)

func CheckRegularTransaction

func CheckRegularTransaction(transaction *tx.Tx) error

CheckRegularTransaction transaction service will use this func to check transaction before accepting to mempool

func CheckSequenceLocks

func CheckSequenceLocks(height int32, time int64) bool

func CombineSignature

func CombineSignature(transaction *tx.Tx, prevPubKey *script.Script, scriptSig *script.Script,
	txOldScriptSig *script.Script, nIn int, money amount.Amount, flags uint32,
	scriptChecker lscript.Checker) (*script.Script, error)

func ContextualCheckTransaction

func ContextualCheckTransaction(transaction *tx.Tx, nBlockHeight int32, nLockTimeCutoff int64) error

func ContextualCheckTransactionForCurrentBlock

func ContextualCheckTransactionForCurrentBlock(transaction *tx.Tx, flags int) error

func ContextureCheckBlockTransactions

func ContextureCheckBlockTransactions(txs []*tx.Tx, blockHeight int32, blockLockTime int64) error

func GetSigOpCountWithP2SH

func GetSigOpCountWithP2SH(transaction *tx.Tx, coinMap *utxo.CoinsMap) int

GetSigOpCountWithP2SH starting BIP16(Apr 1 2012), we should check p2sh

func GetTransactionSigOpCount

func GetTransactionSigOpCount(transaction *tx.Tx, flags uint32, coinMap *utxo.CoinsMap) int

func SignRawTransaction

func SignRawTransaction(transaction *tx.Tx, redeemScripts map[string]string, keys map[string]*crypto.PrivateKey,
	hashType uint32) (err error)

SignRawTransaction txs, preouts, private key, hash type

func UpdateTxCoins

func UpdateTxCoins(tx *tx.Tx, coinMap *utxo.CoinsMap, txundo *undo.TxUndo, height int32)

UpdateTxCoins update coins about tx

Types

This section is empty.

Jump to

Keyboard shortcuts

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