corerpc

package
v0.0.0-...-242325e Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package corerpc implements the data collection abstractions in package collect by using the Bitcoin Core JSON-RPC API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Getters

func Getters(timeNow UnixNow, cfg Config) (col.MempoolStateGetter, col.BlockGetter, error)

Types

type Config

type Config struct {
	Host     string `json:"host" yaml:"host"`
	Port     string `json:"port" yaml:"port"`
	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"password"`

	// HTTP timeout in seconds
	Timeout int `json:"timeout" yaml:"timeout"`
}

type MempoolEntry

type MempoolEntry struct {
	Size_           int64    `json:"vsize"`
	Time_           int64    `json:"time"`
	Depends_        []string `json:"depends"`
	Fee             float64  `json:"fee"`
	CurrentPriority float64  `json:"currentpriority"`
}

There is no longer any concept of priority in Bitcoin Core So any mention of priority here is vestigial

func (*MempoolEntry) Depends

func (m *MempoolEntry) Depends() []string

func (*MempoolEntry) FeeRate

func (m *MempoolEntry) FeeRate() sim.FeeRate

Panics if called with a zero-value receiver

func (*MempoolEntry) IsHighPriority

func (m *MempoolEntry) IsHighPriority() bool

Whether or not the tx is "high priority". We don't want to use these txs to estimate miner's min fee rate policies.

func (*MempoolEntry) Size

func (m *MempoolEntry) Size() sim.TxSize

func (*MempoolEntry) Time

func (m *MempoolEntry) Time() int64

type UnixNow

type UnixNow func() int64

Unix time in seconds

Jump to

Keyboard shortcuts

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