spv

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: MIT Imports: 8 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 Config added in v0.1.1

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

	// The magic number that specify which network to connect.
	Magic uint32

	// The foundation address of the genesis block, which is different between
	// MainNet, TestNet, RegNet etc.
	Foundation string

	// The public seed peers addresses.
	SeedList []string

	// NodePort is the default port for public peers provide services.
	DefaultPort uint16

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

type Service added in v0.1.1

type Service struct {
	spv.SPVService
}

func NewService added in v0.1.1

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

func (*Service) VerifyElaHeader added in v0.1.1

func (s *Service) VerifyElaHeader(hash *common.Uint256) 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