bitcoind

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HttpRequestTimeout = 3 * time.Second
)

Functions

This section is empty.

Types

type BlockchainInfo

type BlockchainInfo struct {
	Chain                string
	Blocks               int32
	Headers              int32
	BestBlockHash        string
	Difficulty           float64
	MedianTime           int32
	VerificationProgress float32
	InitialBlockDownload bool
	ChainWork            string
	SizeOnDisk           int32
	Pruned               bool
	SoftForks            map[string]Fork
	Warnings             string
}

type Fork

type Fork struct {
	Type   string
	Active bool
	Height int32
}

type Mode

type Mode string
const (
	Native   Mode = "native"
	External Mode = "external"
	Light    Mode = "light"
)

type RpcClient

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

func NewRpcClient

func NewRpcClient(config config.RpcConfig) *RpcClient

func (*RpcClient) Close

func (t *RpcClient) Close() error

func (*RpcClient) GetBlockchainInfo

func (t *RpcClient) GetBlockchainInfo(ctx context.Context) (*jsonrpc.RPCResponse, error)

type Service

type Service struct {
	*core.SingleContainerService
	*RpcClient
	// contains filtered or unexported fields
}

func New

func New(
	name string,
	services map[string]core.Service,
	containerName string,
	dockerClient *docker.Client,
	l2ServiceName string,
	rpcConfig config.RpcConfig,
) *Service

func (*Service) Close

func (t *Service) Close() error

func (*Service) GetStatus

func (t *Service) GetStatus(ctx context.Context) string

Jump to

Keyboard shortcuts

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