bitcoin

package
v0.0.0-...-7c6c014 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	SendRawTransaction(tx *wire.MsgTx, allowHighFees bool) (*chainhash.Hash, error)
	Shutdown()
	GetTransaction(txHash *chainhash.Hash) (*btcjson.GetTransactionResult, error)
}

Client defines the interface with only the functions we need.

type MockClient

type MockClient struct{}

MockClient Bitcoin RPC client for testing

func (*MockClient) GetTransaction

func (m *MockClient) GetTransaction(txHash *chainhash.Hash) (*btcjson.GetTransactionResult, error)

GetTransaction is a mock implementation that simulates different scenarios for confirmation

func (*MockClient) SendRawTransaction

func (m *MockClient) SendRawTransaction(_ *wire.MsgTx, _ bool) (*chainhash.Hash, error)

SendRawTransaction is a mock implementation that simulates sending a raw transaction.

func (*MockClient) Shutdown

func (m *MockClient) Shutdown()

Shutdown is a mock implementation that is used in tests.

Jump to

Keyboard shortcuts

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