testutils

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: ISC Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTransaction

func CreateTransaction(txToSpend *externalapi.DomainTransaction, fee uint64) (*externalapi.DomainTransaction, error)

CreateTransaction create a transaction that spends the first output of provided transaction. Assumes that the output being spent has opTrueScript as it's scriptPublicKey Creates the value of the spent output minus 1 sompi

func ForAllNets

func ForAllNets(t *testing.T, skipPow bool, testFunc func(*testing.T, *consensus.Config))

ForAllNets runs the passed testFunc with all available networks if setDifficultyToMinumum = true - will modify the net params to have minimal difficulty, like in SimNet

func ForAllPaths added in v1.2.0

func ForAllPaths(t *testing.T, testFunc func(*testing.T, uint32))

ForAllPaths runs the passed testFunc with all available derivation paths

func NewTestGhostDAGSorter

func NewTestGhostDAGSorter(stagingArea *model.StagingArea, slice []*externalapi.DomainHash, tc testapi.TestConsensus,
	t testing.TB) sort.Interface

NewTestGhostDAGSorter returns a sort.Interface over the slice, so you can sort it via GhostDAG ordering

func OpTrueScript

func OpTrueScript() (*externalapi.ScriptPublicKey, []byte)

OpTrueScript returns a P2SH script paying to an anyone-can-spend address, The second return value is a redeemScript to be used with txscript.PayToScriptHashSignatureScript

Types

This section is empty.

Jump to

Keyboard shortcuts

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