Documentation
¶
Index ¶
- Variables
- func NewBitcoindBackend(t *testing.T, netParams *chaincfg.Params, miner *rpctest.Harness, ...) *chain.FlokicoindConn
- 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 ¶
var ( // NetParams are the default network parameters for the tests. NetParams = &chaincfg.RegressionNetParams )
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, miner *rpctest.Harness, txindex, rpcpolling bool) *chain.FlokicoindConn
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 once the bitcoind is synced to the miner's best height.
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.