spv

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 14 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableLog added in v0.1.1

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.

func UseLogger added in v0.1.1

func UseLogger(logger elalog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using elalog.

Types

type BlockListener added in v0.1.8

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

func (*BlockListener) BlockHeight added in v0.1.8

func (l *BlockListener) BlockHeight() uint32

func (*BlockListener) NotifyBlock added in v0.1.8

func (l *BlockListener) NotifyBlock(block *util.Block)

func (*BlockListener) RegisterFunc added in v0.1.8

func (l *BlockListener) RegisterFunc(handleFunc func(block interface{}) error)

func (*BlockListener) StoreAuxBlock added in v0.1.8

func (l *BlockListener) StoreAuxBlock(block interface{})

type Config added in v0.1.1

type Config struct {
	// DataDir is the data path to store db files peer addresses etc.
	DataDir string

	// The chain parameters within network settings.
	ChainParams *config.Configuration

	// PermanentPeers are the peers need to be connected permanently.
	PermanentPeers []string

	// GenesisAddress is the address generated by the side chain genesis block.
	GenesisAddress string

	//FilterType is the filter type .(FTBloom, FTDPOS  and so on )
	FilterType uint8

	NodeVersion string
}

type Service added in v0.1.1

type Service struct {
	spv.SPVService
	// contains filtered or unexported fields
}

func NewService added in v0.1.1

func NewService(cfg *Config) (*Service, error)

func (*Service) CheckCRCArbiterSignatureV0 added in v0.1.8

func (s *Service) CheckCRCArbiterSignatureV0(sideChainPowTx it.Transaction) error

func (*Service) CheckCRCArbiterSignatureV1 added in v0.1.8

func (s *Service) CheckCRCArbiterSignatureV1(height uint32, sideChainPowTx it.Transaction) error

func (*Service) VerifyTransaction added in v0.1.1

func (s *Service) VerifyTransaction(tx *types.Transaction) error

Jump to

Keyboard shortcuts

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