processor

package
v0.0.0-...-6dc35e2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

type Processor struct {
	Difficulty       float64
	TipHeight        int64
	BackendTipHeight int64
	// contains filtered or unexported fields
}

func NewProcessor

func NewProcessor(rpc *rpcclient.Client, db *sql.DB) (*Processor, error)

func (*Processor) BitsToDiff

func (p *Processor) BitsToDiff(bits uint32) float64

func (*Processor) CreateOutputs

func (p *Processor) CreateOutputs(trx *sql.Tx, transID int64, tx *wire.MsgTx, scriptIDs map[string]int64) error

func (*Processor) EnsureTransactionsInserted

func (p *Processor) EnsureTransactionsInserted(trx *sql.Tx, hashes []*chainhash.Hash) error

func (*Processor) GetScriptIDsForBlock

func (p *Processor) GetScriptIDsForBlock(trx *sql.Tx, blk *wire.MsgBlock) (map[string]int64, error)

func (*Processor) GetTransactionIDsForBlock

func (p *Processor) GetTransactionIDsForBlock(trx *sql.Tx, blockID int64, blk *wire.MsgBlock) (map[string]int64, error)

func (*Processor) IsCoinbase

func (p *Processor) IsCoinbase(tx *wire.MsgTx) bool

func (*Processor) MarkOutputsSpent

func (p *Processor) MarkOutputsSpent(trx *sql.Tx, transID int64, tx *wire.MsgTx, txIDs map[string]int64) error

func (*Processor) ProcessLoop

func (p *Processor) ProcessLoop()

func (*Processor) QueryTransactionIDs

func (p *Processor) QueryTransactionIDs(trx *sql.Tx, hashes []*chainhash.Hash) (map[string]int64, error)

func (*Processor) SetBlockIDForTransactions

func (p *Processor) SetBlockIDForTransactions(trx *sql.Tx, blockID int64, hashes []*chainhash.Hash) error

Jump to

Keyboard shortcuts

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