btcregtest

package module
v0.0.0-...-b72e8b2 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2019 License: ISC Imports: 13 Imported by: 0

README

Btcsuite (Bitcoin) regression testing

Build Status ISC License

Harbours a pre-configured test setup and unit tests to run RPC-driven node tests.

Builds a btcd-specific RPC testing harness crafting and executing integration tests by driving a btcd instance via the RPC interface.

Each instance of an active harness comes equipped with a simple in-memory HD wallet capable of properly syncing to the generated chain, creating new addresses, and crafting fully signed transactions paying to an arbitrary set of outputs.

Build

set GO111MODULE=on
go build ./...
go test ./...
 

License

This code is licensed under the copyfree ISC License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleTestSetup

type SimpleTestSetup struct {

	// Mainnet creates a mainnet test harness
	Mainnet0 *coinharness.ChainWithMatureOutputsSpawner

	// Regnet25 creates a regnet test harness
	// with 25 mature outputs.
	Regnet25 *coinharness.ChainWithMatureOutputsSpawner

	// Simnet25 creates a simnet test harness
	// with 25 mature outputs.
	Simnet25 *coinharness.ChainWithMatureOutputsSpawner

	// Regnet5 creates a regnet test harness
	// with 5 mature outputs.
	Regnet5 *coinharness.ChainWithMatureOutputsSpawner

	// Regnet1 creates a regnet test harness
	// with 1 mature output.
	Regnet1 *coinharness.ChainWithMatureOutputsSpawner

	// Simnet1 creates a simnet test harness
	// with 1 mature output.
	Simnet1 *coinharness.ChainWithMatureOutputsSpawner

	// Regnet0 creates a regnet test harness
	// with only the genesis block.
	Regnet0 *coinharness.ChainWithMatureOutputsSpawner

	// Simnet0 creates a simnet test harness
	// with only the genesis block.
	Simnet0 *coinharness.ChainWithMatureOutputsSpawner

	// WorkingDir defines test setup working dir
	WorkingDir *pin.TempDirHandler
	// contains filtered or unexported fields
}

SimpleTestSetup harbours: - rpctest setup - csf-fork test setup - and bip0009 test setup

func Setup

func Setup() *SimpleTestSetup

Setup deploys this test setup

func (*SimpleTestSetup) TearDown

func (setup *SimpleTestSetup) TearDown()

TearDown all harnesses in test Pool. This includes removing all temporary directories, and shutting down any created processes.

Jump to

Keyboard shortcuts

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