testnode

package
v2.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: LGPL-3.0 Imports: 24 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node interface {
	// Chain returns the underlying chain interface
	Chain() *testchain.Chain

	// Start starts the node
	Start() error

	// Stop stops the node
	Stop() error

	// APIServer returns the node api server
	APIServer() *httptest.Server
}

Node represents a complete test node with chain, API server, and transaction pool capabilities

func NewDefaultNode

func NewDefaultNode() (Node, error)

NewDefaultNode creates a new node with default configuration

type NodeBuilder

type NodeBuilder struct {
	// contains filtered or unexported fields
}

NodeBuilder implements the builder pattern for creating a test node instance

func NewNodeBuilder

func NewNodeBuilder() *NodeBuilder

NewNodeBuilder creates a new NodeBuilder with default configuration

func (*NodeBuilder) Build

func (b *NodeBuilder) Build() (Node, error)

Build creates a new Node with the current configuration. Returns an error if the chain creation fails. If no chain was explicitly set, a default chain will be created with the default fork configuration.

func (*NodeBuilder) WithChain

func (b *NodeBuilder) WithChain(chain *testchain.Chain) *NodeBuilder

WithChain sets the chain for the node. If not set, a default chain will be created during Build().

Jump to

Keyboard shortcuts

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