unittest

package
v0.18.0-beta.rc2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NetParams are the default network parameters for the tests.
	NetParams = &chaincfg.RegressionNetParams
)
View Source
var (
	// TrickleInterval is the interval at which the miner should trickle
	// transactions to its peers. We'll set it small to ensure the miner
	// propagates transactions quickly in the tests.
	TrickleInterval = 10 * time.Millisecond
)

Functions

func NewBitcoindBackend

func NewBitcoindBackend(t *testing.T, netParams *chaincfg.Params,
	minerAddr string, txindex, rpcpolling bool) *chain.BitcoindConn

NewBitcoindBackend spawns a new bitcoind node that connects to a miner at the specified address. The txindex boolean can be set to determine whether the backend node should maintain a transaction index. The rpcpolling boolean can be set to determine whether bitcoind's RPC polling interface should be used for block and tx notifications or if its ZMQ interface should be used. A connection to the newly spawned bitcoind node is returned.

func NewMiner

func NewMiner(t *testing.T, netParams *chaincfg.Params, extraArgs []string,
	createChain bool, spendableOutputs uint32) *rpctest.Harness

NewMiner spawns testing harness backed by a btcd node that can serve as a miner.

func NewNeutrinoBackend

func NewNeutrinoBackend(t *testing.T, netParams *chaincfg.Params,
	minerAddr string) *neutrino.ChainService

NewNeutrinoBackend spawns a new neutrino node that connects to a miner at the specified address.

Types

This section is empty.

Jump to

Keyboard shortcuts

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