Documentation ¶
Index ¶
- Variables
- func NewBitcoindBackend(t *testing.T, netParams *chaincfg.Params, minerAddr string, ...) *chain.BitcoindConn
- func NewMiner(t *testing.T, netParams *chaincfg.Params, extraArgs []string, createChain bool, ...) *rpctest.Harness
- func NewNeutrinoBackend(t *testing.T, netParams *chaincfg.Params, minerAddr string) *neutrino.ChainService
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.
Click to show internal directories.
Click to hide internal directories.