node

package
v0.0.0-...-169a2f2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NodekeyFile = "nodekey"
	GenesisFile = "genesis.json"
	PeersFile   = "peers.json"
)

Variables

View Source
var DefaultConfig = Config{
	Port:            15150,
	APIPort:         9040,
	StorageConfig:   storage.DefaultConfig,
	ExecutionConfig: execution.DefaultConfig,
	ConsensusConfig: consensus.DefaultConfig,
}

Functions

func Run

func Run(config Config)

Types

type Config

type Config struct {
	Debug   bool
	Datadir string
	Port    int
	APIPort int

	StorageConfig   storage.Config
	ExecutionConfig execution.Config
	ConsensusConfig consensus.Config
}

type Genesis

type Genesis struct {
	Validators [][]byte
}

type Node

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

func (*Node) GetBlock

func (node *Node) GetBlock(hash []byte) (*core.Block, error)

func (*Node) GetTxList

func (node *Node) GetTxList(hashes [][]byte) (*core.TxList, error)

type Peer

type Peer struct {
	PubKey []byte
	Addr   string
}

Jump to

Keyboard shortcuts

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