Documentation ¶
Index ¶
- func AdjustedSimnetMiner(client *rpcclient.Client, nb uint32) ([]*chainhash.Hash, error)
- func NewCustomTestRemoteDcrwallet(t TB, nodeName, dataDir string, hdSeed, privatePass []byte, ...) (*grpc.ClientConn, func())
- func NewSetupRPCTest(t *testing.T, maxTries int, netParams *chaincfg.Params, ...) (*rpctest.Harness, error)
- func NewSyncingTestWallet(t TB, rpcConfig *rpcclient.ConnConfig) (*wallet.Wallet, func())
- func NewTestRemoteDcrwallet(t TB, dcrd *rpcclient.ConnConfig) (*grpc.ClientConn, func())
- type TB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdjustedSimnetMiner ¶
AdjustedSimnetMiner is an alternative miner function that instead of relying on the backing node to mine a block, fetches the work required for the next block and mines the block itself while adjusting the timestamp so that (on simnet) no difficulty increase is trigered. After finding a block, it automatically publishes it to the underlying node.
This is only applicable for tests that run on simnet or other networks that have a target block per count of 1 second.
func NewCustomTestRemoteDcrwallet ¶
func NewCustomTestRemoteDcrwallet(t TB, nodeName, dataDir string, hdSeed, privatePass []byte, dcrd *rpcclient.ConnConfig) (*grpc.ClientConn, func())
func NewSetupRPCTest ¶
func NewSetupRPCTest(t *testing.T, maxTries int, netParams *chaincfg.Params, handlers *rpcclient.NotificationHandlers, args []string, setupChain bool, numMatureOutputs uint32) (*rpctest.Harness, error)
NewSetupRPCTest attempts up to maxTries to setup an rpctest harness or errors. This is used to get around the fact the rpctest does not validate listening addresses beforehand and might try to listen on an used address in CI servers.
The returned rpctest is already setup for use.
func NewSyncingTestWallet ¶
func NewTestRemoteDcrwallet ¶
func NewTestRemoteDcrwallet(t TB, dcrd *rpcclient.ConnConfig) (*grpc.ClientConn, func())
NewTestRemoteDcrwallet creates a new dcrwallet process that can be used by a remotedcrwallet instance to perform the interface tests. This currently only supports running the wallet in rpc sync mode.
This function returns the grpc conn and a cleanup function to close the wallet.