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 ¶
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().